mailr23753 - /trunk/sconstruct


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by tlinnet on June 09, 2014 - 19:23:
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]`




Related Messages


Powered by MHonArc, Updated Mon Jun 09 20:00:02 2014