Skip to content

Commit

Permalink
Support Cython 3 where available
Browse files Browse the repository at this point in the history
We currently support Python interpreters 3.7 and newer, and Cython 3
supports Python interpreters 3.8 and newer.  This patch updates the pip
dependencies dependencies to prefer Cython 3 for interpreters 3.8 and
newer, keeping the older version of Cython as a dependency for
interpreter 3.7.

Signed-off-by: Patrick M. Niedzielski <[email protected]>
  • Loading branch information
pniedzielski committed Jan 11, 2024
1 parent 8501bd8 commit 75e90f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions news/18.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Support building with Cython 3
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[build-system]

requires = ["setuptools>=39.2.0",
"cython>=0.28.4",
"wheel>=0.31.0",
"pkgconfig>1.5.0"]
requires = ['setuptools>=39.2.0',
'Cython>=0.28.4, <3; python_version < "3.8"',
'Cython >= 3, <4; python_version >= "3.8"',
'wheel>=0.31.0',
'pkgconfig>1.5.0']

build-backend = "setuptools.build_meta"

Expand Down
3 changes: 2 additions & 1 deletion requirements-test-coverage.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
-r requirements-test.txt
pytest-cov
Cython
Cython >= 0.29, <3; python_version < "3.8"
Cython >=3, <4; python_version >= "3.8"

0 comments on commit 75e90f1

Please sign in to comment.