From 4adbebb80da8ae3b8eb48d28fc40b7c8ab7dcd23 Mon Sep 17 00:00:00 2001 From: auxten Date: Fri, 7 Apr 2023 15:27:16 +0800 Subject: [PATCH] Fix wheel platform tag, thanks https://github.com/pypa/wheel/issues/406#issuecomment-1498991013 --- .github/workflows/build_wheels.yml | 8 ++++---- setup.py | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 6e0d321e9a8..542cefc355c 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -211,16 +211,16 @@ jobs: CC=$(brew --prefix llvm)/bin/clang CXX=$(brew --prefix llvm)/bin/clang++" - name: Install dependencies for building wheels run: | - python3 -m pip install -U pip tox pybind11 twine setuptools wheel - - name: Install dependencies for building wheels - run: python3 -m pip install -U pip tox pybind11 twine setuptools wheel + python3 -m pip install -U pip tox pybind11 twine setuptools wheel>=0.40.0 - name: Build wheels run: | export PATH=$(brew --prefix llvm)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin export CC=$(brew --prefix llvm)/bin/clang export CXX=$(brew --prefix llvm)/bin/clang++ - export ARCHFLAGS="-arch x86_64" make wheel + - name: Fix wheel platform tag + run: | + python3 -m wheel tags --platform-tag=macosx_10_15_x86_64 --remove dist/*.whl - name: Run simple test run: | python3 -m pip install dist/*.whl diff --git a/setup.py b/setup.py index a1819049be0..7e544a1bb5c 100644 --- a/setup.py +++ b/setup.py @@ -155,9 +155,6 @@ def build_extensions(self): cmdclass={'build_ext': BuildExt}, test_suite="tests", zip_safe=False, - options={ - 'bdist_wheel': {'universal': False}, - }, ) except Exception as e: print("Build from setup.py failed. Error: ")