Skip to content

Commit

Permalink
Merge pull request #182 from mkoeppe/cython3
Browse files Browse the repository at this point in the history
Allow Cython 3
  • Loading branch information
dimpase authored Oct 3, 2023
2 parents 2494135 + 074ad27 commit b25d40e
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/ci-sage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ env:
TARGETS: SAGE_CHECK=no SAGE_CHECK_PACKAGES="cysignals,cypari" cysignals cypari
TARGETS_OPTIONAL: build/make/Makefile
# Standard setting: Test the current beta release of Sage:
# Temporarily test with https://github.com/sagemath/sage/pull/36110
SAGE_REPO: sagemath/sage
SAGE_REF: develop
SAGE_REF: refs/pull/36110/merge
REMOVE_PATCHES: "*"

jobs:
Expand Down Expand Up @@ -159,13 +160,34 @@ jobs:
targets: SAGE_CHECK=no SAGE_CHECK_PACKAGES="cysignals,cypari" cysignals cypari
targets_optional: build/make/Makefile
sage_repo: sagemath/sage
sage_ref: develop
sage_ref: refs/pull/36110/merge
upstream_artifact: upstream
# We prefix the image name with the SPKG name ("cysignals-") to avoid the error
# 'Package "sage-docker-..." is already associated with another repository.'
docker_push_repository: ghcr.io/${{ github.repository }}/cysignals-
needs: [dist, ubuntu-without-sage]

docker-sage-incremental:
uses: sagemath/sage/.github/workflows/docker.yml@develop
with:
# Build incrementally from published Docker image
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/sagemath/sage/
from_docker_target: "with-targets"
from_docker_tag: "dev"
docker_targets: "with-targets"
targets_pre: build/make/Makefile
targets: "cysignals-uninstall cypari-uninstall build doc-html ptest"
targets_optional: build/make/Makefile
sage_repo: sagemath/sage
sage_ref: refs/pull/36110/merge
upstream_artifact: upstream
# We prefix the image name with the SPKG name ("cysignals-") to avoid the error
# 'Package "sage-docker-..." is already associated with another repository.'
docker_push_repository: ghcr.io/${{ github.repository }}/cysignals-
needs: [dist, ubuntu-without-sage, docker]

macos-without-sage:
runs-on: macos-latest
strategy:
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Changelog
1.11.3 (not released yet)
^^^^^^^^^^^^^^^^^^^^^^^^^

* Add support for Cython 3.
* Replace `fprintf` by calls to `write`, which is async-signal-safe according to POSIX. [#162]
* Introduce a general hook to interface with custom signal handling

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 = ['setuptools', 'Cython>=0.28, <3']
requires = ['setuptools', 'Cython>=0.28']
build-backend = "setuptools.build_meta"
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
setuptools
wheel
Cython>=0.28, <3
Cython
Sphinx
flake8
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,17 @@ def cythonize(self, extensions):
# Run Cython with -Werror on continuous integration services
# with Python 3.6 or later
from Cython.Compiler import Options
Options.warning_errors = True
Options.warning_errors = False

from Cython.Build.Dependencies import cythonize
return cythonize(extensions,
build_dir=cythonize_dir,
include_path=["src", os.path.join(cythonize_dir, "src")],
compiler_directives=dict(binding=True, language_level=2))
compiler_directives=dict(
binding=True,
language_level=2,
legacy_implicit_noexcept=True,
))


class build_py(_build_py):
Expand Down

0 comments on commit b25d40e

Please sign in to comment.