Skip to content

Commit 3156192

Browse files
authored
Release the PyGobject pin, documenting the consequences of that change. (#3256)
1 parent 678cdf6 commit 3156192

File tree

5 files changed

+25
-15
lines changed

5 files changed

+25
-15
lines changed

.github/workflows/ci.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ jobs:
242242
pre-command: |
243243
sudo apt update -y
244244
sudo apt install -y --no-install-recommends \
245-
blackbox pkg-config python3-dev libgirepository1.0-dev libcairo2-dev \
245+
blackbox pkg-config python3-dev libgirepository-2.0-dev libcairo2-dev \
246246
gir1.2-webkit2-4.1 gir1.2-xapp-1.0 gir1.2-geoclue-2.0 gir1.2-flatpak-1.0
247247
248248
# Start Virtual X Server
@@ -266,7 +266,7 @@ jobs:
266266
pre-command: |
267267
sudo apt update -y
268268
sudo apt install -y --no-install-recommends \
269-
mutter pkg-config python3-dev libgirepository1.0-dev libcairo2-dev \
269+
mutter pkg-config python3-dev libgirepository-2.0-dev libcairo2-dev \
270270
gir1.2-webkit2-4.1 gir1.2-xapp-1.0 gir1.2-geoclue-2.0 gir1.2-flatpak-1.0
271271
272272
# Start Virtual X Server
@@ -290,12 +290,14 @@ jobs:
290290
runs-on: "ubuntu-24.04"
291291
env:
292292
XDG_RUNTIME_DIR: "/tmp"
293-
# The package list should be the same as in unix-prerequisites.rst, and the BeeWare
294-
# tutorial, plus mutter to provide a window manager.
293+
# The package list should be build on the same base as unix-prerequisites.rst,
294+
# and the BeeWare tutorial. Additional packages will be added for window
295+
# management, and features such as web views and geolocation that aren't part
296+
# of the default/tutorial environment.
295297
pre-command: |
296298
sudo apt update -y
297299
sudo apt install -y --no-install-recommends \
298-
mutter pkg-config python3-dev libgirepository1.0-dev libcairo2-dev \
300+
mutter pkg-config python3-dev libgirepository-2.0-dev libcairo2-dev \
299301
gir1.2-webkit-6.0 gir1.2-xapp-1.0 gir1.2-geoclue-2.0 gir1.2-flatpak-1.0 \
300302
gir1.2-gtk-4.0
301303

changes/3143.bugfix.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The binary dependencies for the GTK backend have been updated to reflect changes in requirements of PyGObject.

changes/3143.removal.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
If you're running on Ubuntu 22.04, Debian 11 or Debian 12, you'll need to manually add a pin for ``PyGObject==3.50.0`` to your project. This is because recent PyGObject releases specify a requirement on ``girepository-2.0``, which is not available on older Debian-based distributions. A manual pin is required because there's no way to express a dependency on a system package as part of Python's requirements specifications.

docs/reference/platforms/unix-prerequisites.rst

+14-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,27 @@ some of the common alternatives:
33

44
..
55
The package list should be the same as in ci.yml, and the BeeWare tutorial
6-
(CI will also have WebView requirements)
6+
(CI will also have WebView and other requirements)
77
8-
**Ubuntu / Debian**
8+
**Ubuntu 24.04+ / Debian 13+**
9+
10+
.. code-block:: console
11+
12+
(venv) $ sudo apt update
13+
(venv) $ sudo apt install git build-essential pkg-config python3-dev libgirepository-2.0-dev libcairo2-dev gir1.2-gtk-3.0 libcanberra-gtk3-module
14+
15+
**Ubuntu 22.04 / Debian 11, 12**
916

1017
.. code-block:: console
1118
1219
(venv) $ sudo apt update
1320
(venv) $ sudo apt install git build-essential pkg-config python3-dev libgirepository1.0-dev libcairo2-dev gir1.2-gtk-3.0 libcanberra-gtk3-module
1421
22+
If you're running on Ubuntu 22.04, Debian 11 or Debian 12, you'll also need add a pin
23+
for ``PyGObject==3.50.0``. Later versions of PyGObject require the
24+
``libgirepository-2.0-dev`` library, which isn't available on older Debian-based
25+
distributions.
26+
1527
**Fedora**
1628

1729
.. code-block:: console

gtk/pyproject.toml

+2-8
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,8 @@ root = ".."
6464
[tool.setuptools_dynamic_dependencies]
6565
dependencies = [
6666
"pycairo >= 1.17.0",
67-
# TODO: PyGObject 3.50.0 is the first version with native GTK asyncio integration;
68-
# PyGObject 3.51.0 will introduce a dependency on libgirepository-2.0, which isn't
69-
# available on Ubuntu 22.04 and earlier. We need to make a bunch of other CI and
70-
# documentation changes to accommodate this. Preemptively protect against the future
71-
# release of 3.51.0, and the 3.51.0.dev0 pre-release that has been published to
72-
# PyPI, but has inconsistent metadata and can't be installed with pip. See #3143.
73-
# "pygobject >= 3.50.0",
74-
"pygobject == 3.50.0",
67+
# PyGObject 3.50.0 is the first version with native GTK asyncio integration.
68+
"pygobject >= 3.50.0",
7569
"toga-core == {version}",
7670
]
7771

0 commit comments

Comments
 (0)