Author: bugman Date: Mon Dec 1 19:46:23 2014 New Revision: 26881 URL: http://svn.gna.org/viewcvs/relax?rev=26881&view=rev Log: Updated the sconstruct script for compiling the C modules. The numpy and numarray include directories are now given as arguments to the C compiler. Modified: branches/relax_fit_c_class/sconstruct Modified: branches/relax_fit_c_class/sconstruct URL: http://svn.gna.org/viewcvs/relax/branches/relax_fit_c_class/sconstruct?rev=26881&r1=26880&r2=26881&view=diff ============================================================================== --- branches/relax_fit_c_class/sconstruct (original) +++ branches/relax_fit_c_class/sconstruct Mon Dec 1 19:46:23 2014 @@ -26,6 +26,7 @@ # Import statements. +from numpy import get_include, get_numarray_include from os import F_OK, access, getcwd, path, remove, rmdir, sep, walk, environ import platform from re import search @@ -598,11 +599,15 @@ if env['PLATFORM'] == 'darwin': archs = self.det_arch() + # Get the numpy include path (for numpy/arrayobject.h). + numpy_path = get_include() + numarray_path = get_numarray_include() + # C flags. if SYSTEM == 'Windows': - cflags = '/nologo /I\"' + py_include_minpath + '\"' + cflags = '/nologo /I\"' + py_include_minpath + '\" /I\"' + numpy_path + '\" /I\"' + numarray_path + '\"' else: - cflags = '-I' + py_include_fullpath + cflags = '-I' + py_include_fullpath + ' -I' + numpy_path + ' -I' + numarray_path if env['PLATFORM'] == 'darwin': for arch in archs: cflags += ' -arch %s' % arch