From 26d764fe89a79418c05320ad5ad1570db2e20552 Mon Sep 17 00:00:00 2001 From: Riskfolio Date: Sun, 12 May 2024 01:10:01 -0500 Subject: [PATCH] Update pyproject.toml --- .../install_dependencies.sh | 19 +++++++++++-------- pyproject.toml | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/continuous_integration/install_dependencies.sh b/continuous_integration/install_dependencies.sh index f2a5f962..9edb9991 100644 --- a/continuous_integration/install_dependencies.sh +++ b/continuous_integration/install_dependencies.sh @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 6cf39524..2ad391be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" ]