-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from pmneila/numpy2
Add support for NumPy 2.0
- Loading branch information
Showing
14 changed files
with
99 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: PyMaxflow deployment | ||
|
||
on: | ||
push: | ||
tags: 'v[0-9]+*' | ||
|
||
jobs: | ||
deploy-sdist: | ||
name: Deploy source distribution | ||
runs-on: ubuntu-latest | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install cibuildwheel | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install build | ||
- name: Build sdist | ||
run: python -m build --sdist | ||
- name: Deploy sdist | ||
run: | | ||
python3 -m pip install twine | ||
python3 -m twine upload --skip-existing dist/* | ||
deploy-wheels: | ||
name: Deploy wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
CIBW_ARCHS: "auto64" | ||
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-*" | ||
CIBW_SKIP: "*musllinux* pp*-win* pp*-macosx* pp*" | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest, macos-13] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
- name: Install cibuildwheel | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install cibuildwheel | ||
- name: Build wheels | ||
run: python3 -m cibuildwheel --output-dir wheelhouse | ||
- name: Deploy | ||
run: | | ||
python3 -m pip install twine | ||
python3 -m twine upload --skip-existing wheelhouse/*.whl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# -*- encoding:utf-8 -*- | ||
|
||
__version__ = (1, 3, 0) | ||
__version_str__ = ".".join(map(str, __version__)) | ||
__version__ = "1.3.2" | ||
__version_core__ = (3, 0, 4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel", "Cython", "oldest-supported-numpy"] | ||
requires = ["setuptools", "wheel", "Cython", "numpy~=2.0"] | ||
build-backend = "setuptools.build_meta" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
from Cython.Build import cythonize | ||
|
||
# Get the version number. | ||
__version_str__ = runpy.run_path("maxflow/version.py")["__version_str__"] | ||
__version__ = runpy.run_path("maxflow/version.py")["__version__"] | ||
|
||
|
||
def extensions(): | ||
|
@@ -44,7 +44,7 @@ def extensions(): | |
|
||
setup( | ||
name="PyMaxflow", | ||
version=__version_str__, | ||
version=__version__, | ||
description="A mincut/maxflow package for Python", | ||
author="Pablo Márquez Neila", | ||
author_email="[email protected]", | ||
|
@@ -82,5 +82,5 @@ def extensions(): | |
], | ||
packages=["maxflow"], | ||
ext_modules=extensions(), | ||
install_requires=['numpy'] | ||
install_requires=['numpy>=1.26'] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters