From b763cea73adb013fb689f50d8495c301316c99fd Mon Sep 17 00:00:00 2001 From: Riskfolio Date: Sun, 12 May 2024 01:41:03 -0500 Subject: [PATCH] Update pyproject.toml --- continuous_integration/install_dependencies.sh | 14 +++++++------- pyproject.toml | 18 ++++++++++-------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/continuous_integration/install_dependencies.sh b/continuous_integration/install_dependencies.sh index 9edb9991..b422e949 100644 --- a/continuous_integration/install_dependencies.sh +++ b/continuous_integration/install_dependencies.sh @@ -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 @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 2ad391be..9cb9f94f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"