diff --git a/builder/build-wheels.sh b/builder/build-wheels.sh index 90f87a9..ac343fe 100755 --- a/builder/build-wheels.sh +++ b/builder/build-wheels.sh @@ -8,7 +8,7 @@ export CC CXX # Install a system package required by our library #yum install -y atlas-devel -yum install -y cmake3 gsl-devel zlib-devel +yum install -y cmake3 gsl-devel zlib-devel fftw3-devel ln -fs /usr/bin/cmake3 /usr/bin/cmake @@ -19,17 +19,18 @@ ALL_PYTHON="cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39" for pkg in $ALL_PYTHON; do PYBIN=/opt/python/${pkg}/bin # "${PYBIN}/pip" install -r /io/dev-requirements.txt + "${PYBIN}/pip" install setuptools wheel Cython "${PYBIN}/pip" install -r /io/requirements.txt "${PYBIN}/pip" wheel -vvv /io/ -w wheelhouse/ done # Bundle external shared libraries into the wheels -for whl in wheelhouse/*.whl; do +for whl in wheelhouse/cosmotool*.whl; do auditwheel repair "$whl" --plat $PLAT -w /io/wheelhouse/ done # Install packages and test -for pkg in $ALL_PYTHON; do - PYBIN=/opt/python/${pkg}/bin - "${PYBIN}/pip" install cosmotool --no-index -f /io/wheelhouse -done +#for pkg in $ALL_PYTHON; do +# PYBIN=/opt/python/${pkg}/bin +# "${PYBIN}/pip" install cosmotool --no-index -f /io/wheelhouse +#done diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index e2ea884..db4bc17 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -54,6 +54,10 @@ SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Bsymbolic-functions if(APPLE) set(CMAKE_MODULE_LINKER_FLAGS "-undefined dynamic_lookup") endif() +IF(NOT APPLE) + set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/cosmotool.version") +ENDIF() + target_link_libraries(_cosmotool PRIVATE ${CosmoTool_local} ${GSL_LIBRARIES}) target_link_libraries(_cosmo_power PRIVATE ${CosmoTool_local} ${GSL_LIBRARIES}) diff --git a/python/cosmotool.version b/python/cosmotool.version new file mode 100644 index 0000000..fb25144 --- /dev/null +++ b/python/cosmotool.version @@ -0,0 +1,7 @@ +CODEABI_1.0 { + global: + PyInit_*; + _init; + _fini; + local: *; +};