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 60196cb commit 26d764f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
19 changes: 11 additions & 8 deletions continuous_integration/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,47 @@ 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.16 mkl pip pytest pytest-cov openblas ecos scs osqp cvxopt proxsuite daqp "setuptools>65.5.1" pybind11
#conda install scipy=1.3 numpy=1.18 mkl pip pytest pytest-cov openblas 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>65.5.1" pybind11
elif [[ "$PYTHON_VERSION" == "3.8" ]]; then
conda install scipy=1.3 numpy=1.18 mkl pip pytest pytest-cov openblas 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>65.5.1" 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 openblas 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>65.5.1" 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 openblas 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>65.5.1" 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 openblas 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>65.5.1" 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 openblas 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>65.5.1" pybind11
fi

if [[ "$PYTHON_VERSION" == "3.12" ]]; then
python -m pip install coptpy gurobipy piqp osqp clarabel
elif [[ "$PYTHON_VERSION" == "3.11" ]]; then
python -m pip install coptpy gurobipy cplex piqp osqp diffcp "ortools>=9.7,<9.10" clarabel
# Python 3.8 on Windows will uninstall NumPy 1.16 and install NumPy 1.24 without the exception.
elif [[ "$RUNNER_OS" == "Windows" ]] && [[ "$PYTHON_VERSION" == "3.8" ]]; then
python -m pip install gurobipy clarabel osqp
elif [[ "$PYTHON_VERSION" == "3.8" ]] && [[ "$RUNNER_OS" != "macos-11" ]]; then
python -m pip install gurobipy clarabel piqp
else
python -m pip install "ortools>=9.3,<9.10" coptpy sdpa-python diffcp gurobipy clarabel sdpa-python
fi

# cylp has wheels for all versions 3.7 - 3.10, except for 3.7 on Windows
if [[ "$PYTHON_VERSION" != "3.11" ]] && [[ "$RUNNER_OS" != "Windows" ]]; then
python -m pip install cylp
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ requires = [
"numpy>=1.23.4,<1.24; python_version=='3.11'",
"numpy>=1.26.4; python_version=='3.12'",
"scipy >= 1.1.0",
"setuptools>69.5.1",
"setuptools>65.5.1",
"wheel"
]

0 comments on commit 26d764f

Please sign in to comment.