Fixes for compiler detection in setup.py
This commit is contained in:
parent
f0afb5dc00
commit
793c649a8d
2 changed files with 10 additions and 5 deletions
11
setup.py
11
setup.py
|
@ -167,15 +167,20 @@ class BuildCMakeExt(build_ext):
|
|||
# Change your cmake arguments below as necessary
|
||||
# Below is just an example set of arguments for building Blender as a Python module
|
||||
|
||||
compilers=[]
|
||||
if "CC" in os.environ:
|
||||
compilers.append('-DCMAKE_C_COMPILER=' + os.environ["CC"])
|
||||
if "CXX" in os.environ:
|
||||
compilers.append("-DCMAKE_CXX_COMPILER=" + os.environ["CXX"])
|
||||
|
||||
self.spawn(['cmake', '-H'+SOURCE_DIR, '-B'+self.build_temp,
|
||||
'-DCMAKE_C_COMPILER=' + os.environ["CC"], "-DCMAKE_CXX_COMPILER=" + os.environ["CXX"],
|
||||
'-DENABLE_OPENMP=ON','-DINTERNAL_BOOST=ON','-DINTERNAL_EIGEN=ON',
|
||||
'-DINTERNAL_HDF5=ON','-DINTERNAL_NETCDF=ON',
|
||||
'-DBUILD_PYTHON=ON', '-DINSTALL_PYTHON_LOCAL=OFF',
|
||||
'-DCOSMOTOOL_PYTHON_PACKAGING=ON',
|
||||
f"-DCYTHON={cython_code}",
|
||||
f"-DPYTHON_SITE_PACKAGES={build_dir.absolute()}/private_install",
|
||||
f"-DPYTHON_EXECUTABLE={sys.executable}"])
|
||||
f"-DPYTHON_EXECUTABLE={sys.executable}"] + compilers)
|
||||
|
||||
|
||||
self.announce("Building binaries", level=3)
|
||||
|
@ -218,7 +223,7 @@ class BuildCMakeExt(build_ext):
|
|||
CosmoTool_extension = CMakeExtension(name="cosmotool")
|
||||
|
||||
setup(name='cosmotool',
|
||||
version='1.1.2',
|
||||
version='1.2.0',
|
||||
packages=["cosmotool"],
|
||||
package_dir={'cosmotool': 'python/cosmotool'},
|
||||
install_requires=['numpy','cffi','numexpr','pyfftw','h5py'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue