Skip to content
Snippets Groups Projects
Commit e0e48ae5 authored by Tim Schoof's avatar Tim Schoof
Browse files

Use specific numpy version per python version

The numpy version is chosen based on the numpy version provided by
debian and centos for python < 3.7 and the version used by scipy wheels
for all other python version.

Additionally, the producer
and the consumer now have the same setup and install dependencies on
cython.
parent d824bff5
No related branches found
No related tags found
No related merge requests found
cython
numpy==1.14.6
\ No newline at end of file
cython
numpy==@NUMPY_VERSION@
\ No newline at end of file
......@@ -16,6 +16,6 @@ setup(
name ="asapo_consumer",
ext_modules = ext_modules,
version = "@PYTHON_ASAPO_VERSION@",
setup_requires=["numpy"],
install_requires=["numpy"]
setup_requires=["numpy>=@NUMPY_VERSION@", "cython>=0.28"],
install_requires=["numpy>=@NUMPY_VERSION@"]
)
#!/usr/bin/env bash
set -e
declare -A numpy_versions
numpy_versions[cp27mu]=1.12.1
numpy_versions[cp27m]=1.12.1
numpy_versions[cp35m]=1.12.1
numpy_versions[cp36m]=1.12.1
numpy_versions[cp37m]=1.14.5
numpy_versions[cp38]=1.17.3
for python_path in /opt/python/cp{27,35,36,37}*m; do
python_version=$(basename $python_path)
python_version=${python_version#*-}
python=$python_path/bin/python
pip=$python_path/bin/pip
numpy_version=${numpy_versions[$python_version]}
echo "building wheel for python_version=$python_version with numpy_version=$numpy_version"
cd /asapo/build
cmake -DENABLE_LIBFABRIC=off -DCMAKE_BUILD_TYPE="Release" -DLIBCURL_DIR=/curl -DPython_EXECUTABLE=$python ..
cmake -DENABLE_LIBFABRIC=off -DCMAKE_BUILD_TYPE="Release" -DLIBCURL_DIR=/curl -DPython_EXECUTABLE=$python -DNUMPY_VERSION=$numpy_version ..
cd consumer \
&& $pip install -r /asapo/consumer/api/python/dev-requirements.txt \
&& $pip install -r api/python/dev-requirements.txt\
&& make \
&& $pip wheel api/python/source_dist_linux/dist/*.tar.gz -w wheelhouse --no-deps
cd ../producer \
&& $pip install -r /asapo/producer/api/python/dev-requirements.txt \
&& $pip install -r api/python/dev-requirements.txt \
&& make \
&& $pip wheel api/python/source_dist_linux/dist/*.tar.gz -w wheelhouse --no-deps
done
......
cython
numpy==1.14.6
\ No newline at end of file
cython
numpy==@NUMPY_VERSION@
\ No newline at end of file
......@@ -15,6 +15,6 @@ setup(
name ="asapo_producer",
ext_modules = ext_modules,
version = "@PYTHON_ASAPO_VERSION@",
setup_requires=["numpy","cython>=0.28"],
install_requires=["numpy","cython>=0.28"]
setup_requires=["numpy>=@NUMPY_VERSION@", "cython>=0.28"],
install_requires=["numpy>=@NUMPY_VERSION@"]
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment