Skip to content

Commit

Permalink
chore: make sure cython build is successful or raise when building wh…
Browse files Browse the repository at this point in the history
…eels
  • Loading branch information
bdraco committed Oct 2, 2022
1 parent 0f2b258 commit 44ba25b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
env:
CIBW_SKIP: cp36-*
CIBW_BEFORE_ALL_LINUX: apt-get install -y gcc || yum install -y gcc || apk add gcc
REQUIRE_CYTHON: 1

- uses: actions/upload-artifact@v3
with:
Expand Down
6 changes: 5 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def build_extensions(self):
def build(setup_kwargs):
if os.environ.get("SKIP_CYTHON", False):
return
with contextlib.suppress(Exception):
try:
from Cython.Build import cythonize

setup_kwargs.update(
Expand All @@ -30,3 +30,7 @@ def build(setup_kwargs):
cmdclass=dict(build_ext=BuildExt),
)
)
except Exception:
if os.environ.get("REQUIRE_CYTHON"):
raise
pass

0 comments on commit 44ba25b

Please sign in to comment.