diff --git a/.github/workflows/python-cibuildwheel.yml b/.github/workflows/python-cibuildwheel.yml index 035b5bf49..2e02dc0a0 100644 --- a/.github/workflows/python-cibuildwheel.yml +++ b/.github/workflows/python-cibuildwheel.yml @@ -17,18 +17,20 @@ jobs: os: [ubuntu-22.04, macos-13] # separate archs, so they use individual caches arch: [ 'x86_64', 'arm64' ] - flavor: ['cpython', 'pypy'] + # skip pypy, https://github.com/pypa/distutils/issues/283 + flavor: ['cpython'] # separate musl and many on linux, for mac we just skip one of those target: [ 'many', 'musl' ] exclude: - os: macos-13 target: musl - - os: ubuntu-22.04 - target: musl - flavor: pypy - - os: macos-13 - arch: arm64 - flavor: pypy + # skip pypy, https://github.com/pypa/distutils/issues/283 + #- os: ubuntu-22.04 + # target: musl + # flavor: pypy + #- os: macos-13 + # arch: arm64 + # flavor: pypy steps: - uses: actions/checkout@v4 - name: Set up QEMU @@ -84,6 +86,7 @@ jobs: - name: install mac dependencies X86_64 if: ${{ (runner.os == 'macOS') && (matrix.arch == 'x86_64') }} run: | + echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV && \ brew update && \ brew install zlib snappy boost @@ -109,11 +112,10 @@ jobs: ls /Users/runner/work/keyvi/keyvi/arm64-homebrew - name: Build python wheels for ${{ matrix.os }} on ${{ matrix.arch }} - uses: pypa/cibuildwheel@v2.17.0 + uses: pypa/cibuildwheel@v2.21.3 env: # Skip CPython 3.6 and CPython 3.7 - # skip pypy 3.8, https://github.com/pypa/distutils/issues/283 - CIBW_SKIP: ${{ env.CIBW_SKIP }} cp36-* cp37-* pp38* + CIBW_SKIP: ${{ env.CIBW_SKIP }} cp36-* cp37-* # skip testing all python versions on linux arm, only test 3.12 # skip tests on pypy, currently fails for indexer tests diff --git a/python/pyproject.toml b/python/pyproject.toml new file mode 100644 index 000000000..194726eab --- /dev/null +++ b/python/pyproject.toml @@ -0,0 +1,2 @@ +[build-system] +requires = ["autowrap>=0.16.0", "msgpack>=1.0.0", "pytest>=7.1.1", "cython>=3.0"] diff --git a/python/setup.py b/python/setup.py index c7afd603b..6a6720a82 100644 --- a/python/setup.py +++ b/python/setup.py @@ -327,18 +327,6 @@ def run(self): clean_pykeyvi_build_directory() _clean.clean.run(self) - have_wheel = False - try: - import wheel.bdist_wheel as _bdist_wheel - - class bdist_wheel(custom_opts, _bdist_wheel.bdist_wheel): - parent = _bdist_wheel.bdist_wheel - user_options = _bdist_wheel.bdist_wheel.user_options + custom_user_options - - have_wheel = True - except: - None - class build_cxx(_build_ext.build_ext): description = "customized for keyvi: " + _build_ext.build_ext.description @@ -388,8 +376,7 @@ class build_ext(custom_opts, build_cxx): "bdist": bdist, "clean": clean, } - if have_wheel: - commands["bdist_wheel"] = bdist_wheel + for e in ext_modules: e.cython_directives = {"embedsignature": True}