Skip to content

Commit 0f1635d

Browse files
authored
Merge pull request #44 from beeware/macos-fat-binary
Add backfill wheels for older macOS releases
2 parents 504221d + f6231f8 commit 0f1635d

12 files changed

+41
-4
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- "windows-app"
3838
- "iOS"
3939
- "android"
40-
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
40+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
4141
include:
4242
- runs-on: ubuntu-latest
4343
- pre-command:
@@ -87,12 +87,16 @@ jobs:
8787
briefcase-run-args: " -d '{\"avd\":\"beePhone\"}' --Xemulator=-no-window --Xemulator=-no-snapshot --Xemulator=-no-audio --Xemulator=-no-boot-anim --shutdown-on-exit"
8888

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

94-
- backend: "iOS"
95-
python-version: "3.11"
94+
- backend: "android"
95+
python-version: "3.12"
96+
97+
# Support packages for Flatpak aren't available for 3.12+ on Linux yet
98+
- backend: "linux-flatpak"
99+
python-version: "3.12"
96100

97101
steps:
98102
- uses: actions/[email protected]

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ __pycache__/
33
*.dist-info/
44
build/
55
logs/
6+
.DS_Store

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ test_requires = [
3131

3232
[tool.briefcase.app.testbed.macOS]
3333
requires = [
34+
# Provide a source of binary wheels that aren't provided on PyPI.
35+
"--find-links", "./wheels",
3436
"rubicon-objc",
3537
"std-nslog",
3638
]

src/testbed/app.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import importlib
2+
import os
23
import platform
34
import sys
45

@@ -8,6 +9,25 @@ def main():
89
print(f"Python {platform.python_version()} Verification Suite")
910
print(f"Running on {platform.platform()}")
1011
print("=" * 80)
12+
print(f"{sys.platform=}")
13+
print(f"{sys.implementation=}")
14+
print("-" * 80)
15+
print(f"{platform.architecture()=}")
16+
print(f"{platform.machine()=}")
17+
print(f"{platform.node()=}")
18+
print(f"{platform.processor()=}")
19+
print(f"{platform.release()=}")
20+
print(f"{platform.system()=}")
21+
print(f"{platform.version()=}")
22+
print(f"{platform.uname()=}")
23+
print("-" * 80)
24+
print(f"{os.name=}")
25+
if hasattr(os, "uname"):
26+
print(f"{os.uname()=}")
27+
else:
28+
# Windows
29+
print("os.uname() not available")
30+
print("=" * 80)
1131

1232
# Load the platform module
1333
if hasattr(sys, "getandroidapilevel"):

tests/test_common.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,16 @@ def test_stdlib_modules():
148148
), f"Missing stdlib modules: {', '.join(str(m) for m in missing)}"
149149

150150

151+
def test_sysconfig_data():
152+
"sysconfigdata can be obtained for the platform"
153+
import sysconfig
154+
155+
# Assert that the config exists and isn't empty. The contents is platform dependent,
156+
# but we just need to know the module was found.
157+
config_vars = sysconfig.get_config_vars()
158+
assert len(config_vars.keys()) > 20
159+
160+
151161
def test_bzip2():
152162
"BZip2 compression with the bz2 module works"
153163
import bz2

wheels/.DS_Store

6 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)