[PATCH 1 of 5] packaging: update the Qt6 dependencies on macOS

2 views
Skip to first unread message

Matt Harbison

unread,
Jan 17, 2025, 8:27:54 PMJan 17
to thg...@googlegroups.com
# HG changeset patch
# User Matt Harbison <matt_h...@yahoo.com>
# Date 1736978135 18000
# Wed Jan 15 16:55:35 2025 -0500
# Branch stable
# Node ID 6d294b09ec84a0ddaae52281a0dcf93661ab8f28
# Parent ab3b425ea5e034269875ede362c666ded5df2dc2
# EXP-Topic macos-qt6
packaging: update the Qt6 dependencies on macOS

At the moment, the latest `pyqt6-qt6` package is 6.8.1. By pinning an older
version, we can make a build that runs on any Apple Silicon. Mostly this is a
convenience for me because I have an older build system.

diff --git a/contrib/packaging/macos/requirements-pyqt6.txt b/contrib/packaging/macos/requirements-pyqt6.txt
--- a/contrib/packaging/macos/requirements-pyqt6.txt
+++ b/contrib/packaging/macos/requirements-pyqt6.txt
@@ -1,6 +1,6 @@
#
-# This file is autogenerated by pip-compile with python 3.9
-# To update, run:
+# This file is autogenerated by pip-compile with Python 3.9
+# by the following command:
#
# pip-compile --generate-hashes --no-reuse-hashes --output-file=contrib/packaging/macos/requirements-pyqt6.txt contrib/packaging/macos/requirements-pyqt6.txt.in
#
@@ -54,43 +54,57 @@
--hash=sha256:b3ed06a9e8ac9a9aae5a6f5dbe78a8a58655d17b43b93c078f094ddc476ae297 \
--hash=sha256:fa7bd7bd2771287c0de303af8bfdfc731f51bd2c6a47ab69d117138893b82717
# via -r contrib/packaging/macos/requirements-pyqt6.txt.in
-pyqt6==6.4.0 \
- --hash=sha256:37e399420866fff5c5bd49f56710dffd3a7a126afc6612b877d666f381bd554f \
- --hash=sha256:79d093ce97010eac92e83a4e8efe231328af9ec757ba78c77e46ca1e007eca0d \
- --hash=sha256:8e614cc4b95dec8bec8ba3c3eaf821058b45862e66d69a8c4fb5576123f2be98 \
- --hash=sha256:91392469be1f491905fa9e78fa4e4059a89ab616ddf2ecfd525bc1d65c26bb93
+pyqt6==6.7.1 \
+ --hash=sha256:0adb7914c732ad1dee46d9cec838a98cb2b11bc38cc3b7b36fbd8701ae64bf47 \
+ --hash=sha256:2d771fa0981514cb1ee937633dfa64f14caa902707d9afffab66677f3a73e3da \
+ --hash=sha256:3672a82ccd3a62e99ab200a13903421e2928e399fda25ced98d140313ad59cb9 \
+ --hash=sha256:7f397f4b38b23b5588eb2c0933510deb953d96b1f0323a916c4839c2a66ccccc \
+ --hash=sha256:c2f202b7941aa74e5c7e1463a6f27d9131dbc1e6cabe85571d7364f5b3de7397 \
+ --hash=sha256:f053378e3aef6248fa612c8afddda17f942fb63f9fe8a9aeb2a6b6b4cbb0eba9 \
+ --hash=sha256:fa3954698233fe286a8afc477b84d8517f0788eb46b74da69d3ccc0170d3714c
# via
# -r contrib/packaging/macos/requirements-pyqt6.txt.in
# pyqt6-qscintilla
-pyqt6-qscintilla==2.13.3 \
- --hash=sha256:4127175bd36533ac9efde0a8384947453c0823f3d1f0942aa83d3e67bc1d6ad5 \
- --hash=sha256:60c9f23b11a792ff8684ea6ea6fd298e5e0325b841c1c0eac7a4458efbf557c9 \
- --hash=sha256:a5b45893e2162fe48f712f0db37247a28b37c8236f0447f114e7111c3233eb7e \
- --hash=sha256:b8a1fd78695473a886b043bec820bb072aa29ff511eddd61260c460f79910dfa
+pyqt6-qscintilla==2.14.1 \
+ --hash=sha256:1395515e1dd24264e3db324ad19a8367fa3e485c8616932a2b32517b51a4d2d2 \
+ --hash=sha256:2b16b3ca0c8f6cf4772a85a0a5b030d2a7ad8128e6f5a3fae6d8a641b04f7e41 \
+ --hash=sha256:8849a4a9847bbf3698d0c1cf47e6d08552a49a66928543a73f10d6dcba617d10 \
+ --hash=sha256:8ac7f3f61b76a73d60d7837aa1233f7147b5179fbc426e977a3ac21294a3dc48 \
+ --hash=sha256:a9b5939bd7160bbd095bc06312f2a1289a344b7c4f89633ea7657207212c7d56 \
+ --hash=sha256:b22e93cd70b35cb83dc4177d14c670a02d92d9ea51ee6759bb97d81679c39af2
# via -r contrib/packaging/macos/requirements-pyqt6.txt.in
-pyqt6-qt6==6.4.2 \
- --hash=sha256:9f07c3c100cb46cca4074965e7494d4df4f0fc016497d5303c1fe135822876e1 \
- --hash=sha256:a29b8c858babd523e80c8db5f8fd19792641588ec04eab49af18b7a4423eb99f \
- --hash=sha256:c0e91d0275d428496cacff717a9b719c52bfa52b21f124d638b79cc2217bc81e \
- --hash=sha256:d19c4e72615762cd6f0b043f23fa5f0b02656091427ce6de1efccd58e10e6a53
+pyqt6-qt6==6.7.3 \
+ --hash=sha256:36ea0892b8caeb983af3f285f45fb8dfbb93cfd972439f4e01b7efb2868f6230 \
+ --hash=sha256:50c7482bcdcf2bb78af257fb10ed8b582f8daf91d829782393bc50ac5a0a900c \
+ --hash=sha256:8551732984fb36a5f4f3db51eafc4e8e6caf18617365830285306f2db17a94c2 \
+ --hash=sha256:cb525fdd393332de60887953029276a44de480fce1d785251ae639580f5e7246 \
+ --hash=sha256:f517a93b6b1a814d4aa6587adc312e812ebaf4d70415bb15cfb44268c5ad3f5f
# via pyqt6
-pyqt6-sip==13.4.0 \
- --hash=sha256:2694ae67811cefb6ea3ee0e9995755b45e4952f4dcadec8c04300fd828f91c75 \
- --hash=sha256:3486914137f5336cff6e10a5e9d52c1e60ff883473938b45f267f794daeacb2f \
- --hash=sha256:3ac7e0800180202dcc0c7035ff88c2a6f4a0f5acb20c4a19f71d807d0f7857b7 \
- --hash=sha256:3de18c4a32f717a351d560a39f528af24077f5135aacfa8890a2f2d79f0633da \
- --hash=sha256:6d87a3ee5872d7511b76957d68a32109352caf3b7a42a01d9ee20032b350d979 \
- --hash=sha256:77af9c7e3f50414ec5af9b1534aaf2ba25115ae65aa5ed735111c8ef0884b862 \
- --hash=sha256:802b0cfed19900183220c46895c2635f0dd062f2d275a25506423f911ef74db4 \
- --hash=sha256:83b446d247a92d119d507dbc94fc1f47389d8118a5b6232a2859951157319a30 \
- --hash=sha256:9c5231536e6153071b22175e46e368045fd08d772a90d772a0977d1166c7822c \
- --hash=sha256:9e03c780846fd5d71c06e33322fd11a05713d9cd410e3571d069ac9a84077647 \
- --hash=sha256:bb4f2e2fdcf3a8dafe4256750bbedd9e7107c4fd8afa9c25be28423c36bb12b8 \
- --hash=sha256:cfdcd43e123bd55c155cfe7a33895033e6d25de90a48ed9c25a0ddd0196a810e \
- --hash=sha256:d51704d50b82713fd7c928b7deb31e17be239ddac74fc2fd708e52bd21ecea3a \
- --hash=sha256:de601187055d684b36ebe6e800a5deacaa55b69d71ad43312b76422cfeae0e12 \
- --hash=sha256:e3b17308ca729bcb6d25c01144c6b2e17d40812231c3ef9caaa72a78db2b1069 \
- --hash=sha256:fd2df2a9479b8ac858117bd55dc0ec0bd1ce6c8f3486b0cc5e860c0540a8bba0
+pyqt6-sip==13.9.1 \
+ --hash=sha256:14f95c6352e3b85dc26bf59cfbf77a470ecbd5fcdcf00af4b648f0e1b9eefb9e \
+ --hash=sha256:15be741d1ae8c82bb7afe9a61f3cf8c50457f7d61229a1c39c24cd6e8f4d86dc \
+ --hash=sha256:1d322ded1d1fea339cc6ac65b768e72c69c486eebb7db6ccde061b5786d74cc5 \
+ --hash=sha256:1ec52e962f54137a19208b6e95b6bd9f7a403eb25d7237768a99306cd9db26d1 \
+ --hash=sha256:1fb405615970e85b622b13b4cad140ff1e4182eb8334a0b27a4698e6217b89b0 \
+ --hash=sha256:22d66256b800f552ade51a463510bf905f3cb318aae00ff4288fae4de5d0e600 \
+ --hash=sha256:2ab85aaf155828331399c59ebdd4d3b0358e42c08250e86b43d56d9873df148a \
+ --hash=sha256:3c269052c770c09b61fce2f2f9ea934a67dfc65f443d59629b4ccc8f89751890 \
+ --hash=sha256:5004514b08b045ad76425cf3618187091a668d972b017677b1b4b193379ef553 \
+ --hash=sha256:552ff8fdc41f5769d3eccc661f022ed496f55f6e0a214c20aaf56e56385d61b6 \
+ --hash=sha256:5643c92424fe62cb0b33378fef3d28c1525f91ada79e8a15bd9a05414a09503d \
+ --hash=sha256:56ce0afb19cd8a8c63ff93ae506dffb74f844b88adaa6673ebc0dec43af48a76 \
+ --hash=sha256:57b5312ef13c1766bdf69b317041140b184eb24a51e1e23ce8fc5386ba8dffb2 \
+ --hash=sha256:5d7726556d1ca7a7ed78e19ba53285b64a2a8f6ad7ff4cb18a1832efca1a3102 \
+ --hash=sha256:69a879cfc94f4984d180321b76f52923861cd5bf4969aa885eef7591ee932517 \
+ --hash=sha256:6e6c1e2592187934f4e790c0c099d0033e986dcef7bdd3c06e3895ffa995e9fc \
+ --hash=sha256:8b2ac36d6e04db6099614b9c1178a2f87788c7ffc3826571fb63d36ddb4c401d \
+ --hash=sha256:8c207528992d59b0801458aa6fcff118e5c099608ef0fc6ff8bccbdc23f29c04 \
+ --hash=sha256:976c7758f668806d4df7a8853f390ac123d5d1f73591ed368bdb8963574ff589 \
+ --hash=sha256:accab6974b2758296400120fdcc9d1f37785b2ea2591f00656e1776f058ded6c \
+ --hash=sha256:c1942e107b0243ced9e510d507e0f27aeea9d6b13e0a1b7c06fd52a62e0d41f7 \
+ --hash=sha256:c800db3464481e87b1d2b84523b075df1e8fc7856c6f9623dc243f89be1cb604 \
+ --hash=sha256:e996d320744ca8342cad6f9454345330d4f06bce129812d032bda3bad6967c5c \
+ --hash=sha256:fa27b51ae4c7013b3700cf0ecf46907d1333ae396fc6511311920485cbce094b
# via
# pyqt6
# pyqt6-qscintilla
@@ -104,5 +118,6 @@
# via importlib-metadata

# WARNING: The following packages were not pinned, but pip requires them to be
-# pinned when the requirements file includes hashes. Consider using the --allow-unsafe flag.
+# pinned when the requirements file includes hashes and the requirement is not
+# satisfied by a package already installed. Consider using the --allow-unsafe flag.
# setuptools
diff --git a/contrib/packaging/macos/requirements-pyqt6.txt.in b/contrib/packaging/macos/requirements-pyqt6.txt.in
--- a/contrib/packaging/macos/requirements-pyqt6.txt.in
+++ b/contrib/packaging/macos/requirements-pyqt6.txt.in
@@ -4,5 +4,7 @@
mercurial_keyring
Pygments

-PyQt6
+# Qt 6.8 drops support for macOS 11, which was released in Nov 2020, and the
+# first to support arm64.
+PyQt6 < 6.8
PyQt6-QScintilla

Matt Harbison

unread,
Jan 17, 2025, 8:27:56 PMJan 17
to thg...@googlegroups.com
# HG changeset patch
# User Matt Harbison <matt_h...@yahoo.com>
# Date 1736979809 18000
# Wed Jan 15 17:23:29 2025 -0500
# Branch stable
# Node ID 70581c805246b4665ad878b4f5641d81f6d44350
# Parent eb605d92ee0931492d3ca0b9388cd0aaabd9c409
# EXP-Topic macos-qt6
packaging: update `pygments` for Qt6 builds on macOS

diff --git a/contrib/packaging/macos/requirements-pyqt6.txt b/contrib/packaging/macos/requirements-pyqt6.txt
--- a/contrib/packaging/macos/requirements-pyqt6.txt
+++ b/contrib/packaging/macos/requirements-pyqt6.txt
@@ -54,9 +54,9 @@
--hash=sha256:38b80f0c91f8d2dddb6396e6bbff8a84875f073c510f4f1a307e8ae44c7d73d8 \
--hash=sha256:cab7aec752a8b83e7c6cef7c15271dc720155275e44cbf610e3162e0807313ec
# via -r contrib/packaging/macos/requirements-pyqt6.txt.in
-pygments==2.14.0 \
- --hash=sha256:b3ed06a9e8ac9a9aae5a6f5dbe78a8a58655d17b43b93c078f094ddc476ae297 \
- --hash=sha256:fa7bd7bd2771287c0de303af8bfdfc731f51bd2c6a47ab69d117138893b82717
+pygments==2.19.1 \
+ --hash=sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f \
+ --hash=sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c
# via -r contrib/packaging/macos/requirements-pyqt6.txt.in
pyqt6==6.7.1 \
--hash=sha256:0adb7914c732ad1dee46d9cec838a98cb2b11bc38cc3b7b36fbd8701ae64bf47 \

Matt Harbison

unread,
Jan 17, 2025, 8:27:56 PMJan 17
to thg...@googlegroups.com
# HG changeset patch
# User Matt Harbison <matt_h...@yahoo.com>
# Date 1737061639 18000
# Thu Jan 16 16:07:19 2025 -0500
# Branch stable
# Node ID 82a2f35e9640e55d260a2a4bba68670b10ab4790
# Parent 70581c805246b4665ad878b4f5641d81f6d44350
# EXP-Topic macos-qt6
packaging: normalize the name of the requirements files for macOS builds

This will make it easier to switch the version of PyQt to use when building.
The old file references in the generated file was manually updated. There is a
newer version of Qt5 on macOS, but it was crashing for me on launch when I tried
it.

diff --git a/contrib/packaging/macos/build_py3.sh b/contrib/packaging/macos/build_py3.sh
--- a/contrib/packaging/macos/build_py3.sh
+++ b/contrib/packaging/macos/build_py3.sh
@@ -14,7 +14,7 @@
echo "Creating venv $VENV"
${PYTHON} -m venv --copies "${VENV}"
${VENV}/bin/pip --disable-pip-version-check install -U wheel==0.37.0
- ${VENV}/bin/pip --disable-pip-version-check install -r "${HERE}/requirements-py3.txt"
+ ${VENV}/bin/pip --disable-pip-version-check install -r "${HERE}/requirements-pyqt5.txt"
else
echo "Reusing venv $VENV"
fi
diff --git a/contrib/packaging/macos/requirements-py3.txt b/contrib/packaging/macos/requirements-pyqt5.txt
rename from contrib/packaging/macos/requirements-py3.txt
rename to contrib/packaging/macos/requirements-pyqt5.txt
--- a/contrib/packaging/macos/requirements-py3.txt
+++ b/contrib/packaging/macos/requirements-pyqt5.txt
@@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
-# pip-compile --generate-hashes --no-reuse-hashes --output-file=contrib/packaging/macos/requirements-py3.txt contrib/packaging/macos/requirements-py3.txt.in
+# pip-compile --generate-hashes --no-reuse-hashes --output-file=contrib/packaging/macos/requirements-pyqt5.txt contrib/packaging/macos/requirements-pyqt5.txt.in
#
altgraph==0.17.3 \
--hash=sha256:ad33358114df7c9416cdb8fa1eaa5852166c505118717021c6a8c7c7abbd03dd \
@@ -19,7 +19,7 @@
--hash=sha256:88ca60473b1637055a937933d48840be1b1b6835f381a6158ef118a532583675 \
--hash=sha256:932e5239d526e7acb504017bb707be67019ac428a6932368e6851691093aa842 \
--hash=sha256:db6ef1d8a02395448e0e7b17ac0aa28b8d338b632bbd1ffca08c02ddae32cf97
- # via -r contrib/packaging/macos/requirements-py3.txt.in
+ # via -r contrib/packaging/macos/requirements-pyqt5.txt.in
jaraco-classes==3.2.3 \
--hash=sha256:2353de3288bc6b82120752201c6b1c1a14b058267fa424ed5ce5984e3b922158 \
--hash=sha256:89559fa5c1d3c34eff6f631ad80bb21f378dbcbb35dd161fd2c6b93f5be2f98a
@@ -37,7 +37,7 @@
# via mercurial-keyring
mercurial-keyring==1.4.3 \
--hash=sha256:deb5cdfe81f660099efafb0802e194c8ec52f54802b53a812c3565dbce5c83c7
- # via -r contrib/packaging/macos/requirements-py3.txt.in
+ # via -r contrib/packaging/macos/requirements-pyqt5.txt.in
modulegraph==0.19.3 \
--hash=sha256:0d7817afd71d9aba86b86db014f405cc225f397217eec94bc8f6f473deffb761 \
--hash=sha256:3f91f94d9b7f31904959b1e88c6257297b09fca4f03ac69fd2d0849517b91243
@@ -49,11 +49,11 @@
py2app==0.28.5 \
--hash=sha256:91cbe7eef57cbf6edff313d8c1852b0b401ced45341fe46538bd0aa9c7851c58 \
--hash=sha256:c7b1233e2c896c0c4b6a8946fb0cee248866129c3b6db390ffa568a8325e734f
- # via -r contrib/packaging/macos/requirements-py3.txt.in
+ # via -r contrib/packaging/macos/requirements-pyqt5.txt.in
pygments==2.14.0 \
--hash=sha256:b3ed06a9e8ac9a9aae5a6f5dbe78a8a58655d17b43b93c078f094ddc476ae297 \
--hash=sha256:fa7bd7bd2771287c0de303af8bfdfc731f51bd2c6a47ab69d117138893b82717
- # via -r contrib/packaging/macos/requirements-py3.txt.in
+ # via -r contrib/packaging/macos/requirements-pyqt5.txt.in
pyqt5==5.15.7 \
--hash=sha256:08694f0a4c7d4f3d36b2311b1920e6283240ad3b7c09b515e08262e195dcdf37 \
--hash=sha256:1a793748c60d5aff3850b7abf84d47c1d41edb11231b7d7c16bef602c36be643 \
@@ -61,7 +61,7 @@
--hash=sha256:755121a52b3a08cb07275c10ebb96576d36e320e572591db16cfdbc558101594 \
--hash=sha256:e319c9d8639e0729235c1b09c99afdadad96fa3dbd8392ab561b5ab5946ee6ef
# via
- # -r contrib/packaging/macos/requirements-py3.txt.in
+ # -r contrib/packaging/macos/requirements-pyqt5.txt.in
# qscintilla
pyqt5-qt5==5.15.2 \
--hash=sha256:1988f364ec8caf87a6ee5d5a3a5210d57539988bf8e84714c7d60972692e2f4a \
@@ -100,7 +100,7 @@
--hash=sha256:92ae5bf066e0bcb79f0c1df255882189b66c200f92f08ca14f09b82479469dce \
--hash=sha256:c8db00dc1498e6a86c885bf75c628208dea21ec051eaaeb25946323567959975 \
--hash=sha256:fa48d5e0684c1183cc41cacacf5b180f22dcf29bcc8bafe2cd373832947e4179
- # via -r contrib/packaging/macos/requirements-py3.txt.in
+ # via -r contrib/packaging/macos/requirements-pyqt5.txt.in
six==1.16.0 \
--hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
diff --git a/contrib/packaging/macos/requirements-py3.txt.in b/contrib/packaging/macos/requirements-pyqt5.txt.in
rename from contrib/packaging/macos/requirements-py3.txt.in
rename to contrib/packaging/macos/requirements-pyqt5.txt.in

Matt Harbison

unread,
Jan 17, 2025, 8:27:56 PMJan 17
to thg...@googlegroups.com
# HG changeset patch
# User Matt Harbison <matt_h...@yahoo.com>
# Date 1736978805 18000
# Wed Jan 15 17:06:45 2025 -0500
# Branch stable
# Node ID eb605d92ee0931492d3ca0b9388cd0aaabd9c409
# Parent 6d294b09ec84a0ddaae52281a0dcf93661ab8f28
# EXP-Topic macos-qt6
packaging: update `py2app` and its dependencies on macOS

No particular need, it's just that these haven't been updated in awhile.

diff --git a/contrib/packaging/macos/requirements-pyqt6.txt b/contrib/packaging/macos/requirements-pyqt6.txt
--- a/contrib/packaging/macos/requirements-pyqt6.txt
+++ b/contrib/packaging/macos/requirements-pyqt6.txt
@@ -4,9 +4,9 @@
#
# pip-compile --generate-hashes --no-reuse-hashes --output-file=contrib/packaging/macos/requirements-pyqt6.txt contrib/packaging/macos/requirements-pyqt6.txt.in
#
-altgraph==0.17.3 \
- --hash=sha256:ad33358114df7c9416cdb8fa1eaa5852166c505118717021c6a8c7c7abbd03dd \
- --hash=sha256:c8ac1ca6772207179ed8003ce7687757c04b0b71536f81e2ac5755c6226458fe
+altgraph==0.17.4 \
+ --hash=sha256:1b5afbb98f6c4dcadb2e2ae6ab9fa994bbb8c1d75f4fa96d340f9437ae454406 \
+ --hash=sha256:642743b4750de17e655e6711601b077bc6598dbfa3ba5fa2b2a35ce12b508dff
# via
# macholib
# modulegraph
@@ -28,9 +28,9 @@
--hash=sha256:771ed2a91909389ed6148631de678f82ddc73737d85a927f382a8a1b157898cd \
--hash=sha256:ba2e15a9b35e21908d0aaf4e0a47acc52d6ae33444df0da2b49d41a46ef6d678
# via mercurial-keyring
-macholib==1.16.2 \
- --hash=sha256:44c40f2cd7d6726af8fa6fe22549178d3a4dfecc35a9cd15ea916d9c83a688e0 \
- --hash=sha256:557bbfa1bb255c20e9abafe7ed6cd8046b48d9525db2f9b77d3122a63a2a8bf8
+macholib==1.16.3 \
+ --hash=sha256:07ae9e15e8e4cd9a788013d81f5908b3609aa76f9b1421bae9c4d7606ec86a30 \
+ --hash=sha256:0e315d7583d38b8c77e815b1ecbdbf504a8258d8b3e17b61165c6feb60d18f2c
# via py2app
mercurial-extension-utils==1.5.2 \
--hash=sha256:760188c5eda51e040a20e313cac2abed0eaeed320dfdd3fa4e8ba477fed5f644
@@ -38,17 +38,21 @@
mercurial-keyring==1.4.3 \
--hash=sha256:deb5cdfe81f660099efafb0802e194c8ec52f54802b53a812c3565dbce5c83c7
# via -r contrib/packaging/macos/requirements-pyqt6.txt.in
-modulegraph==0.19.3 \
- --hash=sha256:0d7817afd71d9aba86b86db014f405cc225f397217eec94bc8f6f473deffb761 \
- --hash=sha256:3f91f94d9b7f31904959b1e88c6257297b09fca4f03ac69fd2d0849517b91243
+modulegraph==0.19.6 \
+ --hash=sha256:5443e6d93c0b263f4ea309e2ff01312eef7c424dd51981a1e78e960c90e572b8 \
+ --hash=sha256:c914c8c95a0e10fe88505d4e9c2284b4e3dbc70943e306cc6567e36cc541bf4b
# via py2app
more-itertools==9.0.0 \
--hash=sha256:250e83d7e81d0c87ca6bd942e6aeab8cc9daa6096d12c5308f3f92fa5e5c1f41 \
--hash=sha256:5a6257e40878ef0520b1803990e3e22303a41b5714006c32a3fd8304b26ea1ab
# via jaraco-classes
-py2app==0.28.5 \
- --hash=sha256:91cbe7eef57cbf6edff313d8c1852b0b401ced45341fe46538bd0aa9c7851c58 \
- --hash=sha256:c7b1233e2c896c0c4b6a8946fb0cee248866129c3b6db390ffa568a8325e734f
+packaging==24.2 \
+ --hash=sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759 \
+ --hash=sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f
+ # via py2app
+py2app==0.28.8 \
+ --hash=sha256:38b80f0c91f8d2dddb6396e6bbff8a84875f073c510f4f1a307e8ae44c7d73d8 \
+ --hash=sha256:cab7aec752a8b83e7c6cef7c15271dc720155275e44cbf610e3162e0807313ec
# via -r contrib/packaging/macos/requirements-pyqt6.txt.in
pygments==2.14.0 \
--hash=sha256:b3ed06a9e8ac9a9aae5a6f5dbe78a8a58655d17b43b93c078f094ddc476ae297 \

Matt Harbison

unread,
Jan 17, 2025, 8:27:57 PMJan 17
to thg...@googlegroups.com
# HG changeset patch
# User Matt Harbison <matt_h...@yahoo.com>
# Date 1737068939 18000
# Thu Jan 16 18:08:59 2025 -0500
# Branch stable
# Node ID cd577480757f0e1170a7d0b8a49b18a0effd2c21
# Parent 82a2f35e9640e55d260a2a4bba68670b10ab4790
# EXP-Topic macos-qt6
packaging: conditionalize the macOS build script to support both Qt5 and Qt6

The version can be overridden by setting `QT_MAJOR` to 5 or 6 in the environment,
but it tries to do the right thing by default. I didn't check that all of the
same libraries are in the app bundle and need to be removed that are in the Qt5
app, but when skipping that section of post-build customizing, `codesign`
reported that it wasn't signed properly. It's just easier to run through it for
now and re-sign at the end.

Qt5 doesn't support arm64, and requires Rosetta to be installed to run it.
Unfortunately, while python, py2app, and PyQt6 are all universal2 binaries, the
libraries installed for Qt6 are thin binaries. Maybe there's a way to download
the wheels for both architectures and smash them together. Perhaps with
something like this:

https://github.com/ronaldoussoren/py2app/issues/399#issuecomment-1709305758

For now, we'll just have to build 2 things on two different machines.

We might also have the opposite problem we had before with py2app being a
universal binary, and defaulting to running the arm64 image on Apple Silicon- it
will want to run the amd64 image on an Intel mac, and crash on startup if it was
built for AS because the Qt6 libraries are the wrong architecture again. But
since I expect the Qt6 stuff to be less stable, let's not worry about removing
the amd64 image when building on AS like we do the arm64 image with Qt5 builds.

diff --git a/contrib/packaging/macos/build_py3.sh b/contrib/packaging/macos/build_py3.sh
--- a/contrib/packaging/macos/build_py3.sh
+++ b/contrib/packaging/macos/build_py3.sh
@@ -2,8 +2,28 @@

set -euo pipefail

+DEFAULT_QT_MAJOR="5"
+
+# Default to Qt6 on arm64 because Qt5 isn't supported there and it's unclear
+# if/how to support cross compiling without Rosetta.
+if [[ `arch` == arm64 ]]; then
+ DEFAULT_QT_MAJOR="6"
+fi
+
+QT_MAJOR="${QT_MAJOR:-${DEFAULT_QT_MAJOR}}"
+
+case ${QT_MAJOR} in
+"5"|"6")
+ ;;
+*)
+ echo "Only '5' or '6' is supported for QT_MAJOR: ${QT_MAJOR}"
+ exit 1
+ ;;
+esac
+
+
export APP_NAME="TortoiseHg"
-export QT_VERSION="qt5"
+export QT_VERSION="qt${QT_MAJOR}"

PYTHON=${PYTHON:-python3}
HERE="$(hg root)/contrib/packaging/macos"
@@ -14,7 +34,7 @@
echo "Creating venv $VENV"
${PYTHON} -m venv --copies "${VENV}"
${VENV}/bin/pip --disable-pip-version-check install -U wheel==0.37.0
- ${VENV}/bin/pip --disable-pip-version-check install -r "${HERE}/requirements-pyqt5.txt"
+ ${VENV}/bin/pip --disable-pip-version-check install -r "${HERE}/requirements-pyqt${QT_MAJOR}.txt"
else
echo "Reusing venv $VENV"
fi
@@ -43,11 +63,11 @@

APP="dist/${APP_NAME}.app"

- rm "${APP}/Contents/Resources/lib/python${PYVERSION}/PyQt5/"*.pyi
- rm -r "${APP}/Contents/Resources/lib/python${PYVERSION}/PyQt5/Qt5/qml"
+ rm "${APP}/Contents/Resources/lib/python${PYVERSION}/PyQt${QT_MAJOR}/"*.pyi
+ rm -r "${APP}/Contents/Resources/lib/python${PYVERSION}/PyQt${QT_MAJOR}/Qt${QT_MAJOR}/qml"

# Trim down to plugins bundled with the py2 app
- for f in "${APP}/Contents/Resources/lib/python${PYVERSION}/PyQt5/Qt5/plugins/"*; do
+ for f in "${APP}/Contents/Resources/lib/python${PYVERSION}/PyQt${QT_MAJOR}/Qt${QT_MAJOR}/plugins/"*; do
case "${f##*/}" in
iconengines | imageformats | platforms | printsupport)
continue
@@ -63,7 +83,7 @@
# the app on launch if not present. QtMacExtras.framework is needed to load some
# icons on launch.

- for f in "${APP}/Contents/Resources/lib/python${PYVERSION}/PyQt5/Qt5/lib/"*.framework; do
+ for f in "${APP}/Contents/Resources/lib/python${PYVERSION}/PyQt${QT_MAJOR}/Qt${QT_MAJOR}/lib/"*.framework; do
framework="${f##*/}"
base="${framework%.*}"

@@ -75,8 +95,8 @@

echo "Deleting ${base} components"

- rm -f "${APP}/Contents/Resources/lib/python${PYVERSION}/PyQt5/${base}.abi3.so"
- rm -rf "${APP}/Contents/Resources/lib/python${PYVERSION}/PyQt5/bindings/${base}"
+ rm -f "${APP}/Contents/Resources/lib/python${PYVERSION}/PyQt${QT_MAJOR}/${base}.abi3.so"
+ rm -rf "${APP}/Contents/Resources/lib/python${PYVERSION}/PyQt${QT_MAJOR}/bindings/${base}"
rm -r "${f}"
done


Yuya Nishihara

unread,
Jan 18, 2025, 5:12:44 AMJan 18
to Matt Harbison, thg...@googlegroups.com
On Fri, 17 Jan 2025 20:27:39 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_h...@yahoo.com>
> # Date 1736978135 18000
> # Wed Jan 15 16:55:35 2025 -0500
> # Branch stable
> # Node ID 6d294b09ec84a0ddaae52281a0dcf93661ab8f28
> # Parent ab3b425ea5e034269875ede362c666ded5df2dc2
> # EXP-Topic macos-qt6
> packaging: update the Qt6 dependencies on macOS

Queued, thanks.
Reply all
Reply to author
Forward
0 new messages