diff --git a/.github/workflows/build_wheel_ci.yml b/.github/workflows/build_wheel_ci.yml index 7bc337d..5364b4f 100644 --- a/.github/workflows/build_wheel_ci.yml +++ b/.github/workflows/build_wheel_ci.yml @@ -9,17 +9,21 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-13, macos-14] + os: [ubuntu-22.04, windows-2019, macos-13, macos-14] fail-fast: false env: CIBW_BEFORE_BUILD: pip install -r requirements.txt CIBW_ARCHS_LINUX: "x86_64 aarch64" CIBW_ARCHS_WINDOWS: "AMD64 x86" CIBW_ARCHS_MACOS: "x86_64 universal2 arm64" - CIBW_CONFIG_SETTINGS: "--use-cython --use-cffi" + CIBW_ENVIRONMENT: USE-CYTHON="1" USE-CFFI="1" steps: - uses: actions/checkout@v4 + - name: Check out recursively + run: git submodule update --init --recursive - uses: actions/setup-python@v5 + with: + python-version: "3.10" - name: Set up QEMU if: runner.os == 'Linux' uses: docker/setup-qemu-action@v3 diff --git a/requirements.txt b/requirements.txt index d456962..6f52ad6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ Cython>=3.0.9 +cffi>=1.0.0 \ No newline at end of file diff --git a/setup.py b/setup.py index c9ef9a2..e1d4e50 100644 --- a/setup.py +++ b/setup.py @@ -92,6 +92,9 @@ def has_option(name: str) -> bool: if name in sys.argv[1:]: sys.argv.remove(name) return True + name = name.strip("-").upper() + if os.environ.get(name, None) is not None: + return True return False @@ -100,7 +103,7 @@ def has_option(name: str) -> bool: setup_kw = {} if has_option("--use-cython"): print("building cython") - setup_requires.append("cython") + setup_requires.append("Cython>=3.0.9") setup_kw["ext_modules"] = cythonize( extensions, compiler_directives={ @@ -143,8 +146,6 @@ def main(): "Programming Language :: C", "Programming Language :: Cython", "Programming Language :: Python", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10",