Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libssl-dev
pip install -r requirements-dev.txt
pip install -r requirements-test.txt

- uses: actions/download-artifact@v3
with:
Expand Down
3 changes: 1 addition & 2 deletions requirements-repair.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
wheel<0.38
wheeltools @ git+https://github.com/jcfr/wheeltools.git@wheeltools-2018-10-28-a2f174d0e#egg=wheeltools
wheel>=0.40.0
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ pytest-virtualenv>=1.7.0
scikit-build>=0.10.0
setuptools>=28.0.0
virtualenv>=15.0.3
wheel<0.38
wheel
208 changes: 0 additions & 208 deletions scripts/convert_to_generic_platform_wheel.py

This file was deleted.

23 changes: 14 additions & 9 deletions scripts/repair_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import tempfile
from pathlib import Path

from convert_to_generic_platform_wheel import convert_to_generic_platform_wheel


def main():
if sys.platform.startswith("linux"):
Expand Down Expand Up @@ -55,9 +53,11 @@ def main():
shutil.copyfile(file, tmpdir / file.name)
(file,) = tmpdir.glob("*.whl")

# we need to handle macOS universal2 & arm64 here for now, let's use additional_platforms for this.
additional_platforms = []
# we need to handle macOS universal2 & arm64 here for now, let's use platform_tag_args for this.
platform_tag_args = []
if os_ == "macos":
additional_platforms = []

# first, get the target macOS deployment target from the wheel
match = re.match(r"^.*-macosx_(\d+)_(\d+)_x86_64\.whl$", file.name)
assert match is not None
Expand All @@ -77,13 +77,18 @@ def main():
# They're were also issues with pip not picking up some universal2 wheels, tag twice
additional_platforms.append("macosx_11_0_universal2")

platform_tag_args = [f"--platform-tag=+{'.'.join(additional_platforms)}"]

# make this a py2.py3 wheel
convert_to_generic_platform_wheel(
str(file),
out_dir=str(wheelhouse),
py2_py3=True,
additional_platforms=additional_platforms,
subprocess.run(
["wheel", "tags", "--python-tag", "py2.py3", "--abi-tag", "none", *platform_tag_args, "--remove", str(file)],
check=True,
stdout=subprocess.PIPE,
)
files = list(tmpdir.glob("*.whl"))
assert len(files) == 1, files
file = files[0]
file.rename(wheelhouse / file.name)


if __name__ == "__main__":
Expand Down