Skip to content

Commit

Permalink
Merge pull request #45 from jonasblixt/bump-cibuildwheel
Browse files Browse the repository at this point in the history
Bump cibuildwheel
  • Loading branch information
jonasblixt authored Aug 20, 2024
2 parents 91ab110 + 4728731 commit ef37964
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/punchboot-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on: [pull_request, push, workflow_dispatch]
# version information in path's.
env:
PYTHON_VERSION: "3.12"
LIBUSB_MACOS_ARM64_URL: "https://ghcr.io/v2/homebrew/core/libusb/blobs/sha256:ab90516396d8dc99f96d31615bcbddfcfd2082fcc7494dabb9d22b275628e800"
LIBUSB_MACOS_X86_64_URL: "https://ghcr.io/v2/homebrew/core/libusb/blobs/sha256:e79be7d4c611f0017567172771761b1df62d140e79ffa6d2538577eb24a48e44"
LIBUSB_MACOS_ARM64_URL: "https://ghcr.io/v2/homebrew/core/libusb/blobs/sha256:05c5363ff9f8a4aeaf65eb3f95fba3a4fc7f665d35a627a2d212c43fb7ad5838"
LIBUSB_MACOS_X86_64_URL: "https://ghcr.io/v2/homebrew/core/libusb/blobs/sha256:e02e54902348f1918adf758a6b2f4c5d113570f4c98e9f0a38b8d3b24c50c942"

jobs:
build_wheels:
Expand Down Expand Up @@ -45,11 +45,11 @@ jobs:
# in binary wheels.
#
# If we prefix it with "@rpath" it works better.
install_name_tool -id @rpath/libusb-1.0.0.dylib libusb_x86_64/1.0.26/lib/libusb-1.0.0.dylib
install_name_tool -id @rpath/libusb-1.0.0.dylib libusb_arm64/1.0.26/lib/libusb-1.0.0.dylib
install_name_tool -id @rpath/libusb-1.0.0.dylib libusb_x86_64/1.0.27/lib/libusb-1.0.0.dylib
install_name_tool -id @rpath/libusb-1.0.0.dylib libusb_arm64/1.0.27/lib/libusb-1.0.0.dylib
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
uses: pypa/cibuildwheel@v2.20.0
with:
package-dir: .
output-dir: wheelhouse
Expand Down
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ line-length = 100
extend-exclude = [
"pki",
"doc",
"scripts/genconfig.py",
"scripts/kconfiglib.py",
"scripts/menuconfig.py",
"scripts/**",
]
target-version = "py38"

Expand Down Expand Up @@ -67,4 +65,4 @@ environment = "PB_MACOS_ARCH=x86_64"

[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
repair-wheel-command = "DYLD_LIBRARY_PATH=libusb_{delocate_archs}/1.0.26/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
repair-wheel-command = "DYLD_LIBRARY_PATH=libusb_{delocate_archs}/1.0.27/lib delocate-wheel --require-target-macos-version 12.0 --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import platform
from pathlib import Path

from setuptools import Extension, setup # type: ignore
from setuptools import Extension, setup # type: ignore # noqa: PGH003

pb_base_path: str = "tools/punchboot"
plat: str = platform.system()
Expand All @@ -20,8 +20,8 @@
# get target arch here when cross compiling wheels.
_target_arch = os.environ["PB_MACOS_ARCH"]
_libraries = ["usb-1.0"]
_library_dirs = [f"libusb_{_target_arch}/1.0.26/lib"]
_include_dirs = ["include", f"libusb_{_target_arch}/1.0.26/include"]
_library_dirs = [f"libusb_{_target_arch}/1.0.27/lib"]
_include_dirs = ["include", f"libusb_{_target_arch}/1.0.27/include"]
else:
_libraries = ["usb-1.0"]
_library_dirs = []
Expand Down
2 changes: 1 addition & 1 deletion tools/punchboot/punchboot/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def board_run_command(self, cmd: Union[str, int], args: bytes = b"") -> bytes:

def board_read_status(self) -> str:
"""Read board status."""
return self.pb_s.board_read_status().strip()
return str(self.pb_s.board_read_status().strip())

def slc_set_configuration(self) -> None:
"""Set SLC to configuration.
Expand Down

0 comments on commit ef37964

Please # to comment.