Hi Troels, This appears to be quite a robust solution that will work on all systems :)
Cheers, Edward On 9 June 2014 19:23, <[email protected]> wrote: > Author: tlinnet > Date: Mon Jun 9 19:23:21 2014 > New Revision: 23753 > > URL: http://svn.gna.org/viewcvs/relax?rev=23753&view=rev > Log: > Added searching for enviroment variable PYTHON_INCLUDE_DIR if Python.h is not > found in > standard python library. > > This can be very handsome, if one has a python virtual enviroment for > multiple users. > > This relates to the wiki page: > http://wiki.nmr-relax.com/Epd_canopy > > Modified: > trunk/sconstruct > > Modified: trunk/sconstruct > URL: > http://svn.gna.org/viewcvs/relax/trunk/sconstruct?rev=23753&r1=23752&r2=23753&view=diff > ============================================================================== > --- trunk/sconstruct (original) > +++ trunk/sconstruct Mon Jun 9 19:23:21 2014 > @@ -572,6 +572,18 @@ > py_include_minpath = sys.prefix + path.sep + 'include' > py_include_fullpath = py_include_minpath + path.sep + 'python' + > `sys.version_info[0]` + '.' + `sys.version_info[1]` > > + # Test if Python.h resides here. > + f_name_pyth = py_include_minpath + path.sep + 'Python.h' > + if not access(f_name_pyth, F_OK): > + > + # Test if 'PYTHON_INCLUDE_DIR' has been set to system > environment. > + if 'PYTHON_INCLUDE_DIR' in environ: > + > + # Test if Python.h is here. > + f_name_pyth = environ['PYTHON_INCLUDE_DIR'] + path.sep + > 'Python.h' > + if access(f_name_pyth, F_OK): > + py_include_fullpath = environ['PYTHON_INCLUDE_DIR'] > + > # Construct the python bin path. > py_bin_minpath = sys.prefix + path.sep + 'bin' > py_bin_fullpath = py_bin_minpath + path.sep + 'python' + > `sys.version_info[0]` + '.' + `sys.version_info[1]` > > > _______________________________________________ > relax (http://www.nmr-relax.com) > > This is the relax-commits mailing list > [email protected] > > To unsubscribe from this list, get a password > reminder, or change your subscription options, > visit the list information page at > https://mail.gna.org/listinfo/relax-commits _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-devel mailing list [email protected] To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-devel

