Skip to content

Commit

Permalink
Merge pull request #263 from moorepants/remove-oldest-supported-numpy
Browse files Browse the repository at this point in the history
Remove deprecated oldest-supported-numpy from pyproject.toml.
  • Loading branch information
moorepants authored Sep 8, 2024
2 parents 3ccda5d + 66c8538 commit b44f561
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.29.28" "ipopt=${{ matrix.ipopt-version }}" numpy>=1.21.5 pkg-config>=0.29.2 setuptools>=44.1.1 --file docs/requirements.txt
run: mamba install -y -v lapack "libblas=*=*netlib" "cython>=0.29.28" "ipopt=${{ matrix.ipopt-version }}" numpy>=1.25 pkg-config>=0.29.2 setuptools>=44.1.1 --file docs/requirements.txt
- name: Install CyIpopt
run: |
rm pyproject.toml
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12']
ipopt-version: ['3.12', '3.13', '3.14']
exclude:
- os: windows-latest
Expand All @@ -35,7 +35,7 @@ jobs:
miniforge-variant: Mambaforge
- name: Install basic dependencies against generic blas/lapack
run: |
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.28"
mamba install -q -y lapack "libblas=*=*netlib" "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.25" "pkg-config>=0.29.2" "setuptools>=44.1.1" "cython>=0.29.28"
- run: echo "IPOPTWINDIR=USECONDAFORGEIPOPT" >> $GITHUB_ENV
- name: Install CyIpopt
run: |
Expand All @@ -46,7 +46,7 @@ jobs:
run: |
python -c "import cyipopt"
mamba remove lapack
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 install -q -y "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.25" "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
Expand All @@ -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.21.5" "pkg-config>=0.29.2" "setuptools>=44.1.1" "scipy>1.8.0" "pytest>=6.2.5" "cython=0.29.*"
mamba install -q -y -c conda-forge "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.25" "pkg-config>=0.29.2" "setuptools>=44.1.1" "scipy>1.8.0" "pytest>=6.2.5" "cython=0.29.*"
mamba list
pytest
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: python -m pip install "numpy>=1.21.5" "cython>=0.29.28" "setuptools>44.1.1"
- run: python -m pip install "numpy>=1.25" "cython>=0.29.28" "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/* .
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ Version History
[1.5.0.dev0] - XXXX-XX-XX
~~~~~~~~~~~~~~~~~~~~~~~~~

Changed
+++++++

- Dropped support for Python 3.8. #263
- Dropped support for building the package with NumPy < 1.25. #263

[1.4.1] - 2024-04-02
~~~~~~~~~~~~~~~~~~~~

Expand Down
4 changes: 2 additions & 2 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ dependencies:
* C/C++ compiler
* pkg-config [only for Linux and Mac]
* Ipopt >=3.12 [>= 3.13 on Windows]
* Python 3.8+
* Python 3.9+
* setuptools >=44.1.1
* cython >=0.29.28
* NumPy >=1.21.5
* NumPy >=1.25
* SciPy >=1.8 [optional]

The binaries and header files of the Ipopt package can be obtained from
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["cython>=0.29.28", "oldest-supported-numpy","setuptools>=44.1.1"]
requires = ["cython>=0.29.28", "numpy>=1.25","setuptools>=44.1.1"]
build-backend = "setuptools.build_meta"
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@
from setuptools.extension import Extension

# install requirements before import
# NOTE : NumPy 1.25 is the first release of NumPy that you can link to the
# NumPy C-API and it will be guaranteed to be backward compatible back to NumPy
# 1.19, thus we set the minimum NumPy build version to 1.25. See:
# https://numpy.org/doc/stable/dev/depending_on_numpy.html#adding-a-dependency-on-numpy
# for more information.
from setuptools import dist
SETUP_REQUIRES = [
"cython>=0.29.28",
"numpy>=1.21.5",
"numpy>=1.25",
"setuptools>=44.1.1",
]
dist.Distribution().fetch_build_eggs(SETUP_REQUIRES)
Expand Down Expand Up @@ -57,7 +62,6 @@
"License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down

0 comments on commit b44f561

Please sign in to comment.