Skip to content

Commit

Permalink
Merge pull request #44 from beeware/macos-fat-binary
Browse files Browse the repository at this point in the history
Add backfill wheels for older macOS releases
  • Loading branch information
mhsmith authored Oct 15, 2023
2 parents 504221d + f6231f8 commit 0f1635d
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- "windows-app"
- "iOS"
- "android"
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
include:
- runs-on: ubuntu-latest
- pre-command:
Expand Down Expand Up @@ -87,12 +87,16 @@ jobs:
briefcase-run-args: " -d '{\"avd\":\"beePhone\"}' --Xemulator=-no-window --Xemulator=-no-snapshot --Xemulator=-no-audio --Xemulator=-no-boot-anim --shutdown-on-exit"

exclude:
# Binary packages aren't available for 3.11 on mobile yet
# Binary packages aren't available for 3.11+ on Android yet
- backend: "android"
python-version: "3.11"

- backend: "iOS"
python-version: "3.11"
- backend: "android"
python-version: "3.12"

# Support packages for Flatpak aren't available for 3.12+ on Linux yet
- backend: "linux-flatpak"
python-version: "3.12"

steps:
- uses: actions/[email protected]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ __pycache__/
*.dist-info/
build/
logs/
.DS_Store
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ test_requires = [

[tool.briefcase.app.testbed.macOS]
requires = [
# Provide a source of binary wheels that aren't provided on PyPI.
"--find-links", "./wheels",
"rubicon-objc",
"std-nslog",
]
Expand Down
20 changes: 20 additions & 0 deletions src/testbed/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import importlib
import os
import platform
import sys

Expand All @@ -8,6 +9,25 @@ def main():
print(f"Python {platform.python_version()} Verification Suite")
print(f"Running on {platform.platform()}")
print("=" * 80)
print(f"{sys.platform=}")
print(f"{sys.implementation=}")
print("-" * 80)
print(f"{platform.architecture()=}")
print(f"{platform.machine()=}")
print(f"{platform.node()=}")
print(f"{platform.processor()=}")
print(f"{platform.release()=}")
print(f"{platform.system()=}")
print(f"{platform.version()=}")
print(f"{platform.uname()=}")
print("-" * 80)
print(f"{os.name=}")
if hasattr(os, "uname"):
print(f"{os.uname()=}")
else:
# Windows
print("os.uname() not available")
print("=" * 80)

# Load the platform module
if hasattr(sys, "getandroidapilevel"):
Expand Down
10 changes: 10 additions & 0 deletions tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ def test_stdlib_modules():
), f"Missing stdlib modules: {', '.join(str(m) for m in missing)}"


def test_sysconfig_data():
"sysconfigdata can be obtained for the platform"
import sysconfig

# Assert that the config exists and isn't empty. The contents is platform dependent,
# but we just need to know the module was found.
config_vars = sysconfig.get_config_vars()
assert len(config_vars.keys()) > 20


def test_bzip2():
"BZip2 compression with the bz2 module works"
import bz2
Expand Down
Binary file added wheels/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 0f1635d

Please sign in to comment.