Skip to content

Commit

Permalink
Update pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
dcajasn committed May 12, 2024
1 parent 26d764f commit b763cea
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
14 changes: 7 additions & 7 deletions continuous_integration/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ conda config --set remote_backoff_factor 2
conda config --set remote_read_timeout_secs 120.0

if [[ "$PYTHON_VERSION" == "3.8" ]] && [[ "$RUNNER_OS" == "macos-11" ]]; then
conda install scipy=1.3 numpy=1.18 mkl pip pytest pytest-cov lapack ecos scs osqp cvxopt proxsuite "setuptools>65.5.1" pybind11
conda install scipy=1.3 numpy=1.18 mkl pip pytest pytest-cov lapack ecos scs osqp cvxopt proxsuite "setuptools>68.1.0" pybind11
elif [[ "$PYTHON_VERSION" == "3.8" ]]; then
conda install scipy=1.3 numpy=1.18 mkl pip pytest pytest-cov lapack ecos scs osqp cvxopt proxsuite "setuptools>65.5.1" pybind11
conda install scipy=1.3 numpy=1.18 mkl pip pytest pytest-cov lapack ecos scs osqp cvxopt proxsuite "setuptools>68.1.0" pybind11
elif [[ "$PYTHON_VERSION" == "3.9" ]]; then
# The earliest version of numpy that works is 1.19.
# Given numpy 1.19, the earliest version of scipy we can use is 1.5.
conda install scipy=1.5 numpy=1.19 mkl pip pytest lapack ecos scs osqp cvxopt proxsuite "setuptools>65.5.1" pybind11
conda install scipy=1.5 numpy=1.19 mkl pip pytest lapack ecos scs osqp cvxopt proxsuite "setuptools>68.1.0" pybind11
elif [[ "$PYTHON_VERSION" == "3.10" ]]; then
# The earliest version of numpy that works is 1.21.
# Given numpy 1.21, the earliest version of scipy we can use is 1.7.
conda install scipy=1.7 numpy=1.21 mkl pip pytest lapack ecos scs osqp cvxopt proxsuite "setuptools>65.5.1" pybind11
conda install scipy=1.7 numpy=1.21 mkl pip pytest lapack ecos scs osqp cvxopt proxsuite "setuptools>68.1.0" pybind11
elif [[ "$PYTHON_VERSION" == "3.11" ]]; then
# The earliest version of numpy that works is 1.23.4.
# Given numpy 1.23.4, the earliest version of scipy we can use is 1.9.3.
conda install scipy=1.9.3 numpy=1.23.4 mkl pip pytest lapack ecos scs cvxopt proxsuite "setuptools>65.5.1" pybind11
conda install scipy=1.9.3 numpy=1.23.4 mkl pip pytest lapack ecos scs cvxopt proxsuite "setuptools>68.1.0" pybind11
elif [[ "$PYTHON_VERSION" == "3.12" ]]; then
# The earliest version of numpy that works is 1.26.4
# Given numpy 1.26.4, the earliest version of scipy we can use is 1.9.3.
conda install scipy=1.11.3 numpy=1.26.4 mkl pip pytest lapack ecos scs cvxopt proxsuite daqp "setuptools>65.5.1" pybind11
conda install scipy=1.11.3 numpy=1.26.4 mkl pip pytest lapack ecos scs cvxopt proxsuite daqp "setuptools>68.1.0" pybind11
fi

if [[ "$PYTHON_VERSION" == "3.12" ]]; then
Expand All @@ -51,7 +51,7 @@ if [[ "$PYTHON_VERSION" != "3.11" ]] && [[ "$RUNNER_OS" != "Windows" ]]; then
fi

# SCIP only works with scipy >= 1.5 due to dependency conflicts when installing on Linux/macOS
if [[ "$PYTHON_VERSION" == "3.9" ]] || [[ "$RUNNER_OS" == "Windows" ]]; then
if [[ "$PYTHON_VERSION" == "3.9" ]] && [[ "$RUNNER_OS" == "Windows" ]]; then
conda install pyscipopt
fi

Expand Down
18 changes: 10 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
requires = [
"oldest-supported-numpy",
"pybind11>=2.10.1",
"numpy>=1.18,<1.19; python_version=='3.8'",
"numpy>=1.19,<1.20; python_version=='3.9' and (platform_machine!='arm64' or platform_system!='Darwin')",
"numpy>=1.21.4,<1.22; python_version=='3.9' and (platform_machine=='arm64' and platform_system=='Darwin')",
"numpy>=1.21,<1.22; python_version=='3.10' and (platform_machine!='arm64' or platform_system!='Darwin')",
"numpy>=1.21.4,<1.22; python_version=='3.10' and (platform_machine=='arm64' and platform_system=='Darwin')",
"numpy>=1.23.4,<1.24; python_version=='3.11'",
"numpy>=1.26.4; python_version=='3.12'",
# "numpy>=1.18,<1.19; python_version=='3.8'",
# "numpy>=1.19,<1.20; python_version=='3.9' and (platform_machine!='arm64' or platform_system!='Darwin')",
# "numpy>=1.21.4,<1.22; python_version=='3.9' and (platform_machine=='arm64' and platform_system=='Darwin')",
# "numpy>=1.21,<1.22; python_version=='3.10' and (platform_machine!='arm64' or platform_system!='Darwin')",
# "numpy>=1.21.4,<1.22; python_version=='3.10' and (platform_machine=='arm64' and platform_system=='Darwin')",
# "numpy>=1.23.4,<1.24; python_version=='3.11'",
# "numpy>=1.26.4; python_version=='3.12'",
"scipy >= 1.1.0",
"setuptools>65.5.1",
"setuptools>68.1.0",
"wheel"
]

target-version = "py38"

0 comments on commit b763cea

Please sign in to comment.