we're going to solve this numpy problem using the age-old hack of having a Jamroot.in; this older version should still work if the python wrappers are not desired

This commit is contained in:
Greg Landrum
2009-02-05 05:29:49 +00:00
parent bd2c6c2bfa
commit 1f6589ef48
2 changed files with 96 additions and 0 deletions

11
Code/CompleteJamroot.py Normal file
View File

@@ -0,0 +1,11 @@
import os,sys
try:
import numpy
except ImportError:
print >>sys.stderr,"ERROR: numpy module not found.\nThe RDKit python wrappers will not build correctly, but the rest of the code should be fine."
sys.exit(0)
incDir = os.path.join(os.path.split(numpy.__file__)[0],'core','include')
inD = file('Jamroot.in','r').read()
print >>file('Jamroot','w+'),inD.replace('NUMPY_INCLUDE_DIR',incDir)

85
Code/Jamroot.in Normal file
View File

@@ -0,0 +1,85 @@
import os ;
local BOOSTHOME = [ os.environ BOOSTHOME ] ;
local RDBASE = [ os.environ RDBASE ] ;
# make sure all executables end in .exe:
import type : change-generated-target-suffix ;
type.change-generated-target-suffix EXE : <target-os>linux : exe ;
type.change-generated-target-suffix EXE : <target-os>darwin : exe ;
# Specify the path to the Boost project.
use-project boost
: $(BOOSTHOME) ;
use-project RDKit_Externals
: $(RDBASE)/External ;
project RDKit
: requirements <include>. <threading>multi
<include>$(BOOSTHOME)
<include>$(RDBASE)/External/Lapack++/include
<include>$(RDBASE)/External/vflib-2.0/include
<toolset>gcc:<cflags>-Wno-unused-function
<toolset>darwin:<cflags>-Wno-unused-function
<toolset>gcc:<cflags>-fno-strict-aliasing
<toolset>msvc:<define>WIN32
<include>NUMPY_INCLUDE_DIR
<address-model>64:<cflags>-fPIC
# <define>RDK_USELAPACKPP #<- uncomment this to use lapack++
<target-os>windows:<define>BOOST_NUMERIC_BINDINGS_USE_CLAPACK
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
: default-build release ;
alias all-libraries : Catalogs DistGeom ForceField DataManip/MetricMatrixCalc DataStructs Geometry Query RDBoost RDGeneral Numerics SimDivPickers ChemicalFeatures GraphMol
;
alias all-wrappers : RDBoost/Wrap
DataStructs/Wrap
Geometry/Wrap
ML/Cluster/Murtagh ML/InfoTheory/Wrap ML/Data ML/FeatureSelect/Wrap
DataManip/MetricMatrixCalc/Wrap
SimDivPickers/Wrap
ForceField/Wrap
DistGeom/Wrap
Numerics/Alignment/Wrap
ChemicalFeatures/Wrap
GraphMol//all-wrappers
;
alias nonmol-libraries : Catalogs DistGeom ForceField DataManip/MetricMatrixCalc DataStructs Geometry Query RDBoost RDGeneral Numerics SimDivPickers ChemicalFeatures
;
alias nonmol-wrappers : RDBoost/Wrap
DataStructs/Wrap
Geometry/Wrap
ML/Cluster/Murtagh ML/InfoTheory/Wrap ML/Data ML/FeatureSelect/Wrap
DataManip/MetricMatrixCalc/Wrap
SimDivPickers/Wrap
ForceField/Wrap
DistGeom/Wrap
Numerics/Alignment/Wrap
ChemicalFeatures/Wrap
;
lib lapack
:
: <name>lapack
<target-os>windows:<file>$(RDBASE)/External/Lapack/win32/LAPACK.lib
:
;
lib blas
:
: <name>blas
<target-os>windows:<file>$(RDBASE)/External/Lapack/win32/BLAS.lib
:
;
# if you want to use Lapack++, use this version:
#alias lapacklibs : /RDKit_Externals//Lapack++ lapack blas ;
alias lapacklibs : lapack blas ;
alias vflib : /RDKit_Externals//vflib ;