From 21e3b463bf790f0e83c76def73e170c9b85cdd89 Mon Sep 17 00:00:00 2001 From: "Jason K. Moore" Date: Sat, 23 Sep 2023 09:34:01 +0200 Subject: [PATCH 1/5] Removed requirments.txt: not used and had ipopt incorrectly present. --- requirements.txt | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 93395a98..00000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -cython>=0.26,<3 -ipopt>=3.12 -numpy>=1.15 -pkg-config>=0.29.2 -setuptools>=39.0 From 86c933712dd403b7a2521b41c05e385acf16ea63 Mon Sep 17 00:00:00 2001 From: "Jason K. Moore" Date: Sat, 23 Sep 2023 09:48:00 +0200 Subject: [PATCH 2/5] Bumped minimum dependencies to match those in Ubuntu 22.04. --- .github/workflows/docs.yml | 2 +- .github/workflows/tests.yml | 10 +++++----- docs/requirements.txt | 4 ++-- docs/source/install.rst | 17 +++++++++-------- pyproject.toml | 2 +- setup.py | 10 ++++------ 6 files changed, 22 insertions(+), 23 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 161a4ff6..8f295d13 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,7 +30,7 @@ jobs: channels: conda-forge miniforge-variant: Mambaforge - name: Install basic dependencies - run: mamba install -y -v lapack "libblas=*=*netlib" "cython>=0.26,<3" "ipopt=${{ matrix.ipopt-version }}" numpy>=1.15 pkg-config>=0.29.2 setuptools>=39.0 --file docs/requirements.txt + run: mamba install -y -v lapack "libblas=*=*netlib" "cython=0.29.*" "ipopt=${{ matrix.ipopt-version }}" numpy>=1.21.5 pkg-config>=0.29.2 setuptools>=44.1.1 --file docs/requirements.txt - name: Install CyIpopt run: | rm pyproject.toml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dae49dcd..53bac79f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -33,20 +33,20 @@ jobs: python-version: ${{ matrix.python-version }} channels: conda-forge miniforge-variant: Mambaforge - - name: Install basic dependencies + - name: Install basic dependencies against generic blas/lapack run: | - mamba install -q -y lapack "libblas=*=*netlib" "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.15" "pkg-config>=0.29.2" "setuptools>=39.0" "cython=0.29.*" + mamba install -q -y lapack "libblas=*=*netlib" "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.21.5" "pkg-config>=0.29.2" "setuptools>=44.1.1" "cython=0.29.*" - run: echo "IPOPTWINDIR=USECONDAFORGEIPOPT" >> $GITHUB_ENV - name: Install CyIpopt run: | rm pyproject.toml python -m pip install . mamba list - - name: Test with pytest + - name: Test with pytest using OS specific blas/lapack run: | python -c "import cyipopt" mamba remove lapack - mamba install -q -y "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.15" "pkg-config>=0.29.2" "setuptools>=39.0" "pytest>=3.3.2" "cython=0.29.*" + mamba install -q -y "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.21.5" "pkg-config>=0.29.2" "setuptools>=44.1.1" "pytest>=6.2.5" "cython=0.29.*" mamba list pytest - name: Test with pytest and scipy, new ipopt @@ -55,6 +55,6 @@ jobs: # Ipopt needed different libfortrans. if: (matrix.ipopt-version != '3.12' && matrix.python-version != '3.11') || (matrix.ipopt-version != '3.12' && matrix.python-version != '3.10' && matrix.os != 'macos-latest') run: | - mamba install -q -y -c conda-forge "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.15" "pkg-config>=0.29.2" "setuptools>=39.0" "scipy=1.9.*" "pytest>=3.3.2" "cython=0.29.*" + mamba install -q -y -c conda-forge "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.21.5" "pkg-config>=0.29.2" "setuptools>=44.1.1" "scipy>1.8.0" "pytest>=6.2.5" "cython=0.29.*" mamba list pytest diff --git a/docs/requirements.txt b/docs/requirements.txt index 9b4b2447..e61cb3c4 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,2 @@ -numpydoc>=0.7 -sphinx>=1.6.7 +numpydoc>=1.2 +sphinx>=4.3.2 diff --git a/docs/source/install.rst b/docs/source/install.rst index 3fe320ea..d4ec57d2 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -28,12 +28,12 @@ dependencies: * C/C++ compiler * pkg-config [only for Linux and Mac] - * Ipopt [>= 3.13 on Windows] - * Python 3.6+ - * setuptools - * cython - * numpy - * scipy [optional] + * Ipopt >=3.12 [>= 3.13 on Windows] + * Python 3.8+ + * setuptools >=44.1.1 + * cython >=0.29.8,<3 + * NumPy >=1.21.5 + * SciPy >=1.8 [optional] The binaries and header files of the Ipopt package can be obtained from http://www.coin-or.org/download/binary/Ipopt/. These include a version compiled @@ -44,12 +44,13 @@ On Linux and Mac ~~~~~~~~~~~~~~~~ For Linux and Mac, the ``ipopt`` executable should be in your path and -discoverable by pkg-config, i.e. this command should return a valid result:: +discoverable by ``pkg-config``, i.e. this command should return a valid +result:: $ pkg-config --libs --cflags ipopt You will need to install Ipopt in a system location or set ``LD_LIBRARY_PATH`` -if pkg-config does not find the executable. +if ``pkg-config`` does not find the executable. Once all the dependencies are installed, execute:: diff --git a/pyproject.toml b/pyproject.toml index dc7728c7..c85fe423 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["cython >= 0.26, < 3", "oldest-supported-numpy", "setuptools>=39.0"] +requires = ["cython>=0.29.28,<3", "oldest-supported-numpy","setuptools>=44.1.1"] build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index 28a29049..a014d064 100644 --- a/setup.py +++ b/setup.py @@ -20,8 +20,9 @@ # install requirements before import from setuptools import dist SETUP_REQUIRES = [ - "cython >= 0.26,<3", - "numpy >= 1.15", + "cython>=0.29.28,<3", + "numpy>=1.21.5", + "setuptools>=44.1.1", ] dist.Distribution().fetch_build_eggs(SETUP_REQUIRES) @@ -48,9 +49,7 @@ EMAIL = "moorepants@gmail.com" URL = "https://github.com/mechmotum/cyipopt" INSTALL_REQUIRES = [ - "cython >= 0.26,<3", - "numpy>=1.15", - "setuptools>=39.0", + "numpy>=1.21.5", ] LICENSE = "EPL-2.0" CLASSIFIERS = [ @@ -58,7 +57,6 @@ "License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)", "Intended Audience :: Science/Research", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", From 0187e5bc4bee0c616676f934bafd02c901f93ba6 Mon Sep 17 00:00:00 2001 From: "Jason K. Moore" Date: Sat, 23 Sep 2023 09:50:43 +0200 Subject: [PATCH 3/5] Corrected Cython version in docs. --- docs/source/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index d4ec57d2..1d81fb72 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -31,7 +31,7 @@ dependencies: * Ipopt >=3.12 [>= 3.13 on Windows] * Python 3.8+ * setuptools >=44.1.1 - * cython >=0.29.8,<3 + * cython >=0.29.28,<3 * NumPy >=1.21.5 * SciPy >=1.8 [optional] From 667024ea73370f0744f3c2c5ee5587b889a476ea Mon Sep 17 00:00:00 2001 From: "Jason K. Moore" Date: Sat, 23 Sep 2023 09:52:56 +0200 Subject: [PATCH 4/5] Pin deps in manual windows build. --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 97f00633..d71baf5e 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-python@v4 with: python-version: '3.10' - - run: python -m pip install numpy "cython<3" setuptools + - run: python -m pip install "numpy>=1.21.5" "cython>=0.29.28,<3" "setuptools>44.1.1" - run: Invoke-WebRequest -Uri "https://github.com/coin-or/Ipopt/releases/download/releases%2F3.13.3/Ipopt-3.13.3-win64-msvs2019-md.zip" -OutFile "Ipopt-3.13.3-win64-msvs2019-md.zip" - run: 7z x Ipopt-3.13.3-win64-msvs2019-md.zip - run: mv Ipopt-3.13.3-win64-msvs2019-md/* . From 3446839b501b35385457b335f67c2e00c06b7f52 Mon Sep 17 00:00:00 2001 From: "Jason K. Moore" Date: Sat, 23 Sep 2023 10:08:50 +0200 Subject: [PATCH 5/5] Add pins to the conda cyipopt-dev file. --- conda/cyipopt-dev.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/conda/cyipopt-dev.yml b/conda/cyipopt-dev.yml index c74002bd..241ea329 100644 --- a/conda/cyipopt-dev.yml +++ b/conda/cyipopt-dev.yml @@ -2,13 +2,14 @@ name: cyipopt-dev channels: - conda-forge dependencies: - - cython - - ipopt + - cython >=0.29.28,<3 + - ipopt >=3.12 - libblas * *netlib - - numpy - - pkg-config - - pytest + - numpy >=1.21.5 + - numpydoc >=1.2 + - pkg-config >=0.29.2 + - pytest >=6.2.5 - python >=3.6 - - scipy - - setuptools - - sphinx + - scipy >=1.8 + - setuptools >=44.1.1 + - sphinx >=4.3.2