mirror of
https://github.com/TREX-CoE/trexio.git
synced 2025-01-03 10:06:01 +01:00
pin numpy versions to avoid RuntimeError when importing trexio
This commit is contained in:
parent
68284161d3
commit
6262fd6e9f
@ -58,7 +58,14 @@ function build_wheel_for_py()
|
|||||||
# upgrade pip, otherwise it complains that manylinux wheel is "...not supported wheel on this platform"
|
# upgrade pip, otherwise it complains that manylinux wheel is "...not supported wheel on this platform"
|
||||||
pip install --upgrade pip
|
pip install --upgrade pip
|
||||||
# install dependencies needed to build manylinux wheel
|
# install dependencies needed to build manylinux wheel
|
||||||
pip install --upgrade setuptools wheel auditwheel numpy
|
pip install --upgrade setuptools wheel auditwheel
|
||||||
|
if [ ${PYVERSION} -eq 36 ] || [ ${PYVERSION} -eq 37 ]; then
|
||||||
|
pip install numpy==1.17.3
|
||||||
|
elif [ ${PYVERSION} -eq 38 ]; then
|
||||||
|
pip install numpy==1.18.3
|
||||||
|
else
|
||||||
|
pip install numpy==1.19.3
|
||||||
|
fi
|
||||||
|
|
||||||
# set an environment variable needed to locate numpy header files
|
# set an environment variable needed to locate numpy header files
|
||||||
source tools/set_NUMPY_INCLUDEDIR.sh
|
source tools/set_NUMPY_INCLUDEDIR.sh
|
||||||
|
@ -2,6 +2,19 @@
|
|||||||
requires = [
|
requires = [
|
||||||
"setuptools>=42",
|
"setuptools>=42",
|
||||||
"wheel",
|
"wheel",
|
||||||
"pkgconfig"
|
"pkgconfig",
|
||||||
|
# Numpy requirements for different OS/architectures
|
||||||
|
# Copied from https://github.com/scipy/scipy/blob/master/pyproject.toml (which is also licensed under BSD)
|
||||||
|
"numpy==1.17.3; python_version=='3.6' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64'",
|
||||||
|
"numpy==1.17.3; python_version=='3.7' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64'",
|
||||||
|
"numpy==1.18.3; python_version=='3.8' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64'",
|
||||||
|
"numpy==1.19.3; python_version>='3.9' and (platform_machine!='arm64' or platform_system!='Darwin')",
|
||||||
|
# Aarch64(Python 3.9 requirements are the same as AMD64)
|
||||||
|
"numpy==1.19.2; python_version=='3.6' and platform_machine=='aarch64'",
|
||||||
|
"numpy==1.19.2; python_version=='3.7' and platform_machine=='aarch64'",
|
||||||
|
"numpy==1.19.2; python_version=='3.8' and platform_machine=='aarch64'",
|
||||||
|
# Darwin Arm64
|
||||||
|
"numpy>=1.20.0; python_version=='3.8' and platform_machine=='arm64' and platform_system=='Darwin'",
|
||||||
|
"numpy>=1.20.0; python_version=='3.9' and platform_machine=='arm64' and platform_system=='Darwin'"
|
||||||
]
|
]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
setuptools>=42
|
setuptools>=42
|
||||||
pkgconfig
|
pkgconfig
|
||||||
numpy
|
numpy>=1.17.3
|
||||||
|
@ -113,7 +113,6 @@ setup(name = 'trexio',
|
|||||||
"Operating System :: MacOS"
|
"Operating System :: MacOS"
|
||||||
],
|
],
|
||||||
python_requires = ">=3.6",
|
python_requires = ">=3.6",
|
||||||
setup_requires = ['numpy', 'pkgconfig'],
|
install_requires = ['numpy>=1.17.3']
|
||||||
install_requires = ['numpy']
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user