Changeset 336 for trunk/setup.py.in


Ignore:
Timestamp:
03/10/15 12:12:38 (9 years ago)
Author:
bas
Message:

preparing for new pbs_python release that supports torque 5.x, see #47

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/setup.py.in

    r316 r336  
    3434except OSError:
    3535    pass
     36
     37if LooseVersion(VERSION) >= LooseVersion('5.0'):
     38
     39    inc=os.environ.get('PBS_PYTHON_INCLUDEDIR','/usr/include/torque')
     40    os.environ['CC']='g++'
     41    os.environ['CFLAGS']=' '.join(os.environ.get('CFLAGS','').split(' ')+['-I%s'%inc])
     42   
     43    if not os.path.exists(os.path.join(inc,'log.h')):
     44        print 'Failed to find log.h in include dir %s. (Set include dir via PBS_PYTHON_INCLUDEDIR variable)'%inc
     45        sys.exit(2)
     46 
     47    for fn in glob.glob('*.h'):
     48        os.remove(fn)
     49     
     50    TORQUE_VERSION='TORQUE_5'
     51    SOURCE_FILE='src/5.x/pbs_wrap.cxx'
     52
     53    os.symlink('5.X/pbs.py', 'pbs.py')
    3654
    3755if LooseVersion(VERSION) >= LooseVersion('4.2'):
Note: See TracChangeset for help on using the changeset viewer.