From 179c905c36a38127bcf9391d94a09a8ad31d5db1 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 4 Oct 2020 09:46:38 +0200 Subject: [PATCH] Fix wheel building --- builder/build-wheels.sh | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/builder/build-wheels.sh b/builder/build-wheels.sh index e5c1b6f..1e310aa 100755 --- a/builder/build-wheels.sh +++ b/builder/build-wheels.sh @@ -1,6 +1,11 @@ #!/bin/bash set -e -x +CC=cc +CXX=c++ + +export CC CXX + # Install a system package required by our library #yum install -y atlas-devel yum install -y cmake3 gsl-devel zlib-devel diff --git a/setup.py b/setup.py index 6437ecf..08d94d9 100644 --- a/setup.py +++ b/setup.py @@ -157,7 +157,7 @@ class BuildCMakeExt(build_ext): cython_code = os.path.join(str(build_dir.absolute()),'mycython') with open(cython_code, mode="wt") as ff: ff.write("#!/bin/sh\n" - "${PYTHON} -c 'from Cython.Compiler.Main import setuptools_main; setuptools_main()' $@") + f"{sys.executable} -c 'from Cython.Compiler.Main import setuptools_main; setuptools_main()' $@") os.chmod(cython_code, stat.S_IXUSR|stat.S_IWUSR|stat.S_IRUSR|stat.S_IRGRP) # Now that the necessary directories are created, build