Skip to content

Commit 097addc

Browse files
committed
use env var
1 parent 2989469 commit 097addc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/build_wheel_ci.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ jobs:
1616
CIBW_ARCHS_LINUX: "x86_64 aarch64"
1717
CIBW_ARCHS_WINDOWS: "AMD64 x86"
1818
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
19-
CIBW_CONFIG_SETTINGS: "--use-cython --use-cffi"
19+
CIBW_ENVIRONMENT: USE-CYTHON="1" USE-CFFI="1"
2020
steps:
2121
- uses: actions/checkout@v4
22+
- name: Check out recursively
23+
run: git submodule update --init --recursive
2224
- uses: actions/setup-python@v5
2325
- name: Set up QEMU
2426
if: runner.os == 'Linux'

setup.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ def has_option(name: str) -> bool:
9292
if name in sys.argv[1:]:
9393
sys.argv.remove(name)
9494
return True
95+
name = name.strip("-").upper()
96+
if os.environ.get(name, None) is not None:
97+
return True
9598
return False
9699

97100

@@ -100,7 +103,7 @@ def has_option(name: str) -> bool:
100103
setup_kw = {}
101104
if has_option("--use-cython"):
102105
print("building cython")
103-
setup_requires.append("cython")
106+
setup_requires.append("Cython>=3.0.9")
104107
setup_kw["ext_modules"] = cythonize(
105108
extensions,
106109
compiler_directives={

0 commit comments

Comments
 (0)