Skip to content

Commit 69856df

Browse files
committed
Merge branch 'main' into py3.13-support
2 parents a001520 + de8ee2a commit 69856df

File tree

4 files changed

+33
-82
lines changed

4 files changed

+33
-82
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,17 @@ on:
66
- main
77
workflow_call:
88

9+
# Cancel active CI runs for a PR before starting another run
10+
concurrency:
11+
group: ${{ github.ref }}
12+
cancel-in-progress: true
13+
914
defaults:
1015
run:
11-
shell: bash # https://github.com/beeware/briefcase/pull/912
16+
shell: bash
17+
18+
env:
19+
FORCE_COLOR: "1"
1220

1321
jobs:
1422
pre-commit:
@@ -55,17 +63,17 @@ jobs:
5563
- backend: linux-system
5664
runs-on: ubuntu-latest
5765
python-version: "system"
58-
pre-command: "sudo apt-get install -qq python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-dev libgirepository1.0-dev libcairo2-dev pkg-config"
66+
pre-command: "sudo apt update -y && sudo apt install -y --no-install-recommends python3-dev python3-pip libcairo2-dev libgirepository1.0-dev gir1.2-gtk-3.0"
5967
briefcase-target: "linux system"
6068

6169
# - backend: linux-appimage
6270
# runs-on: ubuntu-latest
63-
# pre-command: "sudo apt-get install -y python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-dev libgirepository1.0-dev libcairo2-dev pkg-config libfuse2"
71+
# pre-command: "sudo apt update -y && sudo apt install -y --no-install-recommends libfuse2 libthai-dev libegl1"
6472
# briefcase-target: "linux appimage"
6573

6674
- backend: linux-flatpak
6775
runs-on: ubuntu-latest
68-
pre-command: "sudo apt-get install -qq python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-dev libgirepository1.0-dev libcairo2-dev pkg-config flatpak flatpak-builder"
76+
pre-command: "sudo apt update -y && sudo apt install -y --no-install-recommends flatpak flatpak-builder elfutils"
6977
briefcase-target: "linux flatpak"
7078

7179
- backend: windows-VisualStudio
@@ -84,43 +92,37 @@ jobs:
8492
- backend: android
8593
runs-on: ubuntu-latest
8694
briefcase-target: "android"
95+
briefcase-run-args: >
96+
--device '{"avd":"beePhone"}'
97+
--Xemulator=-no-window
98+
--Xemulator=-no-snapshot
99+
--Xemulator=-no-audio
100+
--Xemulator=-no-boot-anim
101+
--shutdown-on-exit
87102
pre-command: |
88-
# check if virtualization is supported...
89-
sudo apt install -qq --no-install-recommends cpu-checker coreutils && echo "CPUs=$(nproc --all)" && kvm-ok
90103
# allow access to KVM to run the emulator
91104
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
92105
| sudo tee /etc/udev/rules.d/99-kvm4all.rules
93106
sudo udevadm control --reload-rules
94107
sudo udevadm trigger --name-match=kvm
95-
briefcase-run-args: " -d '{\"avd\":\"beePhone\"}' --Xemulator=-no-window --Xemulator=-no-snapshot --Xemulator=-no-audio --Xemulator=-no-boot-anim --shutdown-on-exit"
96-
97108
exclude:
98109
# Binary packages aren't available for 3.12+ on Android yet
99-
- backend: "android"
100-
python-version: "3.12"
101-
102-
- backend: "android"
103-
python-version: "3.13-dev"
104-
105-
# Support packages for Flatpak aren't available for 3.12+ on Linux yet
106-
- backend: "linux-flatpak"
110+
- backend: android
107111
python-version: "3.12"
108112

109-
- backend: "linux-flatpak"
110-
python-version: "3.13-dev"
111-
112113
steps:
113-
- uses: actions/[email protected]
114+
- name: Checkout
115+
uses: actions/[email protected]
114116
with:
115117
fetch-depth: 0
116118

117119
- name: Set up Python
118-
uses: actions/setup-python@v4.7.1
120+
uses: actions/setup-python@v5.1.1
119121
if: matrix.python-version != 'system'
120122
with:
121123
python-version: ${{ matrix.python-version }}
122124

123-
- name: Install dependencies
125+
- name: Install Dependencies
124126
run: ${{ matrix.pre-command }}
125127

126128
- name: Install Briefcase
@@ -132,8 +134,8 @@ jobs:
132134
- name: Package
133135
run: briefcase package ${{ matrix.briefcase-target }} --update --adhoc-sign
134136

135-
- name: Upload logs
136-
uses: actions/upload-artifact@v3.1.3
137+
- name: Upload Logs
138+
uses: actions/upload-artifact@v4.3.4
137139
if: failure()
138140
with:
139141
name: build-failure-logs-${{ matrix.backend }}-${{ matrix.python-version }}

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
exclude: "^(attic|examples/.template|nursery)/"
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.5.0
4+
rev: v4.6.0
55
hooks:
66
- id: check-toml
77
- id: check-yaml
@@ -10,20 +10,20 @@ repos:
1010
- id: end-of-file-fixer
1111
- id: trailing-whitespace
1212
- repo: https://github.com/PyCQA/isort
13-
rev: 5.12.0
13+
rev: 5.13.2
1414
hooks:
1515
- id: isort
1616
additional_dependencies: [toml]
1717
- repo: https://github.com/asottile/pyupgrade
18-
rev: v3.15.0
18+
rev: v3.16.0
1919
hooks:
2020
- id: pyupgrade
2121
args: [--py38-plus]
22-
- repo: https://github.com/psf/black
23-
rev: 23.9.1
22+
- repo: https://github.com/psf/black-pre-commit-mirror
23+
rev: 24.4.2
2424
hooks:
2525
- id: black
2626
- repo: https://github.com/PyCQA/flake8
27-
rev: 6.1.0
27+
rev: 7.1.0
2828
hooks:
2929
- id: flake8

pyproject.toml

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -66,57 +66,9 @@ system_runtime_requires = [
6666
"libcanberra-gtk3-module",
6767
]
6868

69-
[tool.briefcase.app.testbed.linux.appimage]
70-
manylinux = "manylinux_2_28"
71-
requires = [
72-
'--no-binary', ':all:',
73-
]
74-
75-
system_requires = [
76-
# Needed to compile pycairo wheel
77-
"cairo-gobject-devel",
78-
# Needed to compile PyGObject wheel
79-
"gobject-introspection-devel",
80-
# Needed to provide GTK
81-
"gtk3-devel",
82-
# Dependencies that GTK looks for at runtime, that need to be
83-
# in the build environment to be picked up by linuxdeploy
84-
"libcanberra-gtk3",
85-
"PackageKit-gtk3-module",
86-
"gvfs-client",
87-
# Needed to compile Pillow
88-
"libjpeg-devel",
89-
# Needed to compile Cryptography
90-
"openssl-devel",
91-
]
92-
93-
linuxdeploy_plugins = [
94-
'DEPLOY_GTK_VERSION=3 gtk',
95-
]
96-
97-
dockerfile_extra_content = """
98-
# Install Rust (required for cryptography)
99-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
100-
# Set up compilers (required for numpy)
101-
ENV CXX="g++ -pthread"
102-
ENV AR=ar
103-
# Add a symlink for python->python3 (needed for pandas)
104-
# Pandas *requires* that the Python binary be called `python`, not `python3`.
105-
# However, Python-standalone *only* provides `python3`, and at runtime, we
106-
# only need `python3`. We can't (easily) reconfigure the Meson build for Pandas,
107-
# so we put a symlink in `brutus`'s bin path.
108-
RUN mkdir -p /home/brutus/bin
109-
RUN ln -si /app/Testbed.AppDir/usr/python/bin/python3 /home/brutus/bin/python
110-
# Set the path to include all the things we've installed.
111-
ENV PATH="/home/brutus/bin:/home/brutus/.cargo/bin:${PATH}"
112-
"""
113-
114-
# support_package = "../Python-linux-support/dist/Python-3.10-linux-x86_64-support.custom.tar.gz"
115-
# template = "../../templates/briefcase-linux-appimage-template"
116-
11769
[tool.briefcase.app.testbed.linux.flatpak]
11870
flatpak_runtime = "org.gnome.Platform"
119-
flatpak_runtime_version = "44"
71+
flatpak_runtime_version = "45"
12072
flatpak_sdk = "org.gnome.Sdk"
12173

12274
# template = "../../templates/briefcase-linux-flatpak-template"
@@ -145,7 +97,6 @@ requires = [
14597

14698
[tool.briefcase.app.testbed.android]
14799
requires = [
148-
"rubicon-java",
149100
# Android doesn't provide the zoneinfo TZ database; use the Python provided one
150101
"tzdata",
151102
]

tests/test_common.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ def test_stdlib_modules():
116116
# Modules that do not exist on Android
117117
if hasattr(sys, "getandroidapilevel"):
118118
all_modules.remove("grp")
119-
all_modules.remove("_crypt")
120119

121120
# Modules that do not exist on iOS
122121
if sys.platform == "ios":
@@ -127,7 +126,6 @@ def test_stdlib_modules():
127126

128127
# Modules that do not exist on Windows
129128
if sys.platform == "win32":
130-
all_modules.remove("_crypt")
131129
all_modules.remove("_posixsubprocess")
132130
all_modules.remove("fcntl")
133131
all_modules.remove("grp")

0 commit comments

Comments
 (0)