Skip to content

Commit

Permalink
Qt 6.8.1 (#3633)
Browse files Browse the repository at this point in the history
* Qt 6.8.1

Bumps minimum glibc to 2.35, and minimum macOS to 12

* Drop generation of Qt5 packaged build

Closes #3615

* Include qt6 requirements in aqt wheel; drop extra deps

* Fix aqt wheels growing over time
  • Loading branch information
dae authored Jan 9, 2025
1 parent 39bf29e commit 5d150c7
Show file tree
Hide file tree
Showing 14 changed files with 189 additions and 245 deletions.
3 changes: 2 additions & 1 deletion .buildkite/linux/docker/Dockerfile.amd64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:11-slim
FROM ubuntu:22.04

ARG DEBIAN_FRONTEND="noninteractive"

Expand Down Expand Up @@ -32,6 +32,7 @@ RUN apt-get update && apt install --yes gnupg ca-certificates && \
libssl-dev \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxi6 \
libxkbcommon-x11-0 \
libxkbcommon0 \
Expand Down
3 changes: 2 additions & 1 deletion .buildkite/linux/docker/Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:11-slim
FROM ubuntu:22.04

ARG DEBIAN_FRONTEND="noninteractive"
ENV PYTHONPATH=/usr/lib/python3/dist-packages
Expand Down Expand Up @@ -33,6 +33,7 @@ RUN apt-get update && apt install --yes gnupg ca-certificates && \
libssl-dev \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxi6 \
libxkbcommon-x11-0 \
libxkbcommon0 \
Expand Down
2 changes: 1 addition & 1 deletion build/configure/src/aqt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ fn copy_sveltekit(build: &mut Build) -> Result<()> {
inputs: inputs![":sveltekit:folder"],
target_folder: "qt/_aqt/data/web/",
strip_prefix: "$builddir/",
extra_args: "-a",
extra_args: "-a --delete",
},
)
}
Expand Down
81 changes: 10 additions & 71 deletions build/configure/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,18 @@ use crate::platform::overriden_rust_target_triple;
#[derive(Debug, PartialEq, Eq)]
enum DistKind {
Standard,
Alternate,
}

impl DistKind {
fn folder_name(&self) -> &'static str {
match self {
DistKind::Standard => "std",
DistKind::Alternate => "alt",
}
}

fn name(&self) -> &'static str {
match self {
DistKind::Standard => "standard",
DistKind::Alternate => "alternate",
}
}
}
Expand All @@ -61,14 +58,6 @@ pub fn build_bundle(build: &mut Build) -> Result<()> {
download_dist_folder_deps(build)?;
build_dist_folder(build, DistKind::Standard)?;

// repeat for Qt5
if !targetting_macos_arm() {
if !cfg!(target_os = "macos") {
setup_qt5_venv(build)?;
}
build_dist_folder(build, DistKind::Alternate)?;
}

build_packages(build)?;

Ok(())
Expand All @@ -95,18 +84,13 @@ const MAC_AMD_AUDIO: OnlineArchive = OnlineArchive {
};

const MAC_ARM_QT6: OnlineArchive = OnlineArchive {
url: "https://github.com/ankitects/anki-bundle-extras/releases/download/anki-2024-02-29/pyqt6.6-mac-arm64.tar.zst",
sha256: "9b2ade4ae9b80506689062845e83e8c60f7fa9843545bf7bb2d11d3e2f105878",
url: "https://github.com/ankitects/anki-bundle-extras/releases/download/anki-2024-12-14/pyqt6.8-mac-arm64.tar.zst",
sha256: "7753d5bf070d167beaa6b3240691b70c5ceddabb4dd1cca8e13037bfeb6ae32d",
};

const MAC_AMD_QT6: OnlineArchive = OnlineArchive {
url: "https://github.com/ankitects/anki-bundle-extras/releases/download/anki-2024-02-29/pyqt6.6-mac-amd64.tar.zst",
sha256: "dbd0871e4da22820d1fa9ab29220d631467d1178038dcab4b15169ad7f499b1b",
};

const MAC_AMD_QT5: OnlineArchive = OnlineArchive {
url: "https://github.com/ankitects/anki-bundle-extras/releases/download/anki-2022-02-09/pyqt5.14-mac-amd64.tar.gz",
sha256: "474951bed79ddb9570ee4c5a6079041772551ea77e77171d9e33d6f5e7877ec1",
url: "https://github.com/ankitects/anki-bundle-extras/releases/download/anki-2024-12-14/pyqt6.8-mac-amd64.tar.zst",
sha256: "d8c868afe0a5f98980421c06658ec96b6c557006e4702230f574daf88d1c8dd0",
};

const LINUX_QT_PLUGINS: OnlineArchive = OnlineArchive {
Expand All @@ -133,12 +117,7 @@ fn download_dist_folder_deps(build: &mut Build) -> Result<()> {
} else {
download_and_extract(build, "mac_amd_audio", MAC_AMD_AUDIO, empty_manifest())?;
download_and_extract(build, "mac_amd_qt6", MAC_AMD_QT6, empty_manifest())?;
download_and_extract(build, "mac_amd_qt5", MAC_AMD_QT5, empty_manifest())?;
bundle_deps.extend([
":extract:mac_amd_audio",
":extract:mac_amd_qt6",
":extract:mac_amd_qt5",
]);
bundle_deps.extend([":extract:mac_amd_audio", ":extract:mac_amd_qt6"]);
}
} else {
download_and_extract(
Expand Down Expand Up @@ -175,12 +154,6 @@ const PRIMARY_VENV: Venv = Venv {
path_without_builddir: "bundle/pyenv",
};

/// Only used for copying Qt libs on Windows/Linux.
const QT5_VENV: Venv = Venv {
label: "bundle:pyenv-qt5",
path_without_builddir: "bundle/pyenv-qt5",
};

fn setup_primary_venv(build: &mut Build) -> Result<()> {
let mut qt6_reqs = inputs![
"python/requirements.bundle.txt",
Expand All @@ -207,26 +180,6 @@ fn setup_primary_venv(build: &mut Build) -> Result<()> {
Ok(())
}

fn setup_qt5_venv(build: &mut Build) -> Result<()> {
let qt5_reqs = inputs![
"python/requirements.base.txt",
if cfg!(target_os = "macos") {
"python/requirements.qt5_14.txt"
} else {
"python/requirements.qt5_15.txt"
}
];
build.add_action(
QT5_VENV.label,
PythonEnvironment {
folder: QT5_VENV.path_without_builddir,
base_requirements_txt: "python/requirements.base.txt".into(),
requirements_txt: qt5_reqs,
extra_binary_exports: &[],
},
)
}

struct InstallAnkiWheels {
venv: Venv,
}
Expand Down Expand Up @@ -352,7 +305,6 @@ impl BuildAction for BuildDistFolder {
build.add_variable("kind", self.kind.name());
let folder = match self.kind {
DistKind::Standard => "bundle/std",
DistKind::Alternate => "bundle/alt",
};
build.add_outputs("out_folder", vec![folder]);
build.add_outputs("stamp", vec![format!("{folder}.stamp")]);
Expand All @@ -364,13 +316,9 @@ impl BuildAction for BuildDistFolder {
}

fn build_dist_folder(build: &mut Build, kind: DistKind) -> Result<()> {
let mut deps = inputs![":bundle:deps", ":bundle:binary", glob!["qt/bundle/**"]];
if kind == DistKind::Alternate && !cfg!(target_os = "macos") {
deps = inputs![deps, QT5_VENV.label_as_target("")];
}
let deps = inputs![":bundle:deps", ":bundle:binary", glob!["qt/bundle/**"]];
let group = match kind {
DistKind::Standard => "bundle:folder:std",
DistKind::Alternate => "bundle:folder:alt",
};
build.add_action(group, BuildDistFolder { kind, deps })
}
Expand All @@ -380,13 +328,9 @@ fn build_packages(build: &mut Build) -> Result<()> {
build_windows_installers(build)
} else if cfg!(target_os = "macos") {
build_mac_app(build, DistKind::Standard)?;
if !targetting_macos_arm() {
build_mac_app(build, DistKind::Alternate)?;
}
build_dmgs(build)
} else {
build_tarball(build, DistKind::Standard)?;
build_tarball(build, DistKind::Alternate)
build_tarball(build, DistKind::Standard)
}
}

Expand All @@ -407,7 +351,6 @@ impl BuildAction for BuildTarball {
let version = anki_version();
let qt = match self.kind {
DistKind::Standard => "qt6",
DistKind::Alternate => "qt5",
};
let output_folder_base = format!("anki-{version}-linux-{qt}");
let output_tarball = format!("bundle/package/{output_folder_base}.tar.zst");
Expand All @@ -434,12 +377,12 @@ impl BuildAction for BuildWindowsInstallers {

fn files(&mut self, build: &mut impl ninja_gen::build::FilesHandle) {
let version = anki_version();
let outputs = ["qt6", "qt5"].iter().map(|qt| {
let outputs = ["qt6"].iter().map(|qt| {
let output_base = format!("anki-{version}-windows-{qt}");
format!("bundle/package/{output_base}.exe")
});

build.add_inputs("", inputs![":bundle:folder:std", ":bundle:folder:alt"]);
build.add_inputs("", inputs![":bundle:folder:std"]);
build.add_variable("version", &version);
build.add_variable("bundle_root", "$builddir/bundle");
build.add_outputs("out", outputs);
Expand Down Expand Up @@ -486,11 +429,7 @@ impl BuildAction for BuildDmgs {
} else {
"intel"
};
let qt = if targetting_macos_arm() {
&["qt6"][..]
} else {
&["qt6", "qt5"]
};
let qt = &["qt6"][..];
let dmgs = qt
.iter()
.map(|qt| format!("bundle/dmg/anki-{version}-mac-{platform}-{qt}.dmg"));
Expand Down
8 changes: 4 additions & 4 deletions build/configure/src/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ impl BuildAction for BuildWheel {

let tag = if let Some(platform) = self.platform {
let platform = match platform {
Platform::LinuxX64 => "manylinux_2_31_x86_64",
Platform::LinuxArm => "manylinux_2_31_aarch64",
Platform::MacX64 => "macosx_10_13_x86_64",
Platform::MacArm => "macosx_11_0_arm64",
Platform::LinuxX64 => "manylinux_2_35_x86_64",
Platform::LinuxArm => "manylinux_2_35_aarch64",
Platform::MacX64 => "macosx_12_0_x86_64",
Platform::MacArm => "macosx_12_0_arm64",
Platform::WindowsX64 => "win_amd64",
};
format!("cp39-abi3-{platform}")
Expand Down
14 changes: 1 addition & 13 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,26 +133,14 @@ To build wheels on Mac/Linux:

The generated wheels are in out/wheels. You can then install them by copying the paths into a pip install command.
Follow the steps [on the beta site](https://betas.ankiweb.net/#via-pypipip), but replace the
`pip install --upgrade --pre aqt[qt6]` line with something like:
`pip install --upgrade --pre aqt` line with something like:

```
/my/pyenv/bin/pip install --upgrade out/wheels/*.whl
```

(On Windows you'll need to list out the filenames manually instead of using a wildcard).

You'll also need to install PyQt:

```
$ /my/pyenv/bin/pip install pyqt6 pyqt6-webengine
```

or

```
$ my/pyenv/bin/pip install pyqt5 pyqtwebengine
```

## Cleaning up build files

Apart from submodule checkouts, most build files go into the `out/` folder (and
Expand Down
10 changes: 5 additions & 5 deletions python/requirements.qt6_lin.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pyqt6==6.6.1
pyqt6-qt6==6.6.2
pyqt6-webengine==6.6.0
pyqt6-webengine-qt6==6.6.2
pyqt6_sip==13.6.0
pyqt6==6.8.0
pyqt6-qt6==6.8.1
pyqt6-webengine==6.8.0
pyqt6-webengine-qt6==6.8.1
pyqt6_sip==13.9.1
93 changes: 51 additions & 42 deletions python/requirements.qt6_lin.txt
Original file line number Diff line number Diff line change
@@ -1,56 +1,65 @@
pyqt6==6.6.1 \
--hash=sha256:03a656d5dc5ac31b6a9ad200f7f4f7ef49fa00ad7ce7a991b9bb691617141d12 \
--hash=sha256:5aa0e833cb5a79b93813f8181d9f145517dd5a46f4374544bcd1e93a8beec537 \
--hash=sha256:6b43878d0bbbcf8b7de165d305ec0cb87113c8930c92de748a11c473a6db5085 \
--hash=sha256:9f158aa29d205142c56f0f35d07784b8df0be28378d20a97bcda8bd64ffd0379
pyqt6==6.8.0 \
--hash=sha256:452bae5840077bf0f146c798d7777f70d7bdd0c7dcfa9ee7a415c1daf2d10038 \
--hash=sha256:48bace7b87676bba5e6114482f3a20ca20be90c7f261b5d340464313f5f2bf5e \
--hash=sha256:6d8628de4c2a050f0b74462e4c9cb97f839bf6ffabbca91711722ffb281570d9 \
--hash=sha256:8c5c05f5fdff31a5887dbc29b27615b09df467631238d7b449283809ffca6228 \
--hash=sha256:a9913d479f1ffee804bf7f232079baea4fb4b221a8f4890117588917a54ea30d \
--hash=sha256:cf7123caea14e7ecf10bd12cae48e8d9970ef7caf627bc7d7988b0baa209adb3
# via
# -r requirements.qt6_lin.in
# pyqt6-webengine
pyqt6-qt6==6.6.2 \
--hash=sha256:5a41fe9d53b9e29e9ec5c23f3c5949dba160f90ca313ee8b96b8ffe6a5059387 \
--hash=sha256:7ef446d3ffc678a8586ff6dc9f0d27caf4dff05dea02c353540d2f614386faf9 \
--hash=sha256:8d7f674a4ec43ca00191e14945ca4129acbe37a2172ed9d08214ad58b170bc11 \
--hash=sha256:b8363d88623342a72ac17da9127dc12f259bb3148796ea029762aa2d499778d9
pyqt6-qt6==6.8.1 \
--hash=sha256:006d786693d0511fbcf184a862edbd339c6ed1bb3bd9de363d73a19ed4b23dff \
--hash=sha256:08065d595f1e6fc2dde9f4450eeff89082f4bad26f600a8e9b9cc5966716bfcf \
--hash=sha256:1eb8460a1fdb38d0b2458c2974c01d471c1e59e4eb19ea63fc447aaba3ad530e \
--hash=sha256:20843cb86bd94942d1cd99e39bf1aeabb875b241a35a8ab273e4bbbfa63776db \
--hash=sha256:9f3790c4ce4dc576e48b8718d55fb8743057e6cbd53a6ca1dd253ffbac9b7287 \
--hash=sha256:a8bc2ed4ee5e7c6ff4dd1c7db0b27705d151fee5dc232bbd1bf17618f937f515
# via
# -r requirements.qt6_lin.in
# pyqt6
pyqt6-sip==13.6.0 \
--hash=sha256:0dfd22cfedd87e96f9d51e0778ca2ba3dc0be83e424e9e0f98f6994d8d9c90f0 \
--hash=sha256:13885361ca2cb2f5085d50359ba61b3fabd41b139fb58f37332acbe631ef2357 \
--hash=sha256:24441032a29791e82beb7dfd76878339058def0e97fdb7c1cea517f3a0e6e96b \
--hash=sha256:2486e1588071943d4f6657ba09096dc9fffd2322ad2c30041e78ea3f037b5778 \
--hash=sha256:3075d8b325382750829e6cde6971c943352309d35768a4d4da0587459606d562 \
--hash=sha256:33ea771fe777eb0d1a2c3ef35bcc3f7a286eb3ff09cd5b2fdd3d87d1f392d7e8 \
--hash=sha256:39854dba35f8e5a4288da26ecb5f40b4c5ec1932efffb3f49d5ea435a7f37fb3 \
--hash=sha256:3bf03e130fbfd75c9c06e687b86ba375410c7a9e835e4e03285889e61dd4b0c4 \
--hash=sha256:43fb8551796030aae3d66d6e35e277494071ec6172cd182c9569ab7db268a2f5 \
--hash=sha256:58f68a48400e0b3d1ccb18090090299bad26e3aed7ccb7057c65887b79b8aeea \
--hash=sha256:5b9c6b6f9cfccb48cbb78a59603145a698fb4ffd176764d7083e5bf47631d8df \
--hash=sha256:747f6ca44af81777a2c696bd501bc4815a53ec6fc94d4e25830e10bc1391f8ab \
--hash=sha256:86a7b67c64436e32bffa9c28c9f21bf14a9faa54991520b12c3f6f435f24df7f \
--hash=sha256:8c282062125eea5baf830c6998587d98c50be7c3a817a057fb95fef647184012 \
--hash=sha256:8f9df9f7ccd8a9f0f1d36948c686f03ce1a1281543a3e636b7b7d5e086e1a436 \
--hash=sha256:98bf954103b087162fa63b3a78f30b0b63da22fd6450b610ec1b851dbb798228 \
--hash=sha256:9adf672f9114687533a74d5c2d4c03a9a929ad5ad9c3e88098a7da1a440ab916 \
--hash=sha256:a6ce80bc24618d8a41be8ca51ad9f10e8bc4296dd90ab2809573df30a23ae0e5 \
--hash=sha256:d6b5f699aaed0ac1fcd23e8fbca70d8a77965831b7c1ce474b81b1678817a49d \
--hash=sha256:fa759b6339ff7e25f9afe2a6b651b775f0a36bcb3f5fa85e81a90d3b033c83f4 \
--hash=sha256:fa7b10af7488efc5e53b41dd42c0f421bde6c2865a107af7ae259aff9d841da9
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
# -r requirements.qt6_lin.in
# pyqt6
# pyqt6-webengine
pyqt6-webengine==6.6.0 \
--hash=sha256:9d542738ed6e11c1978ce59035c07627def7c63eef0f59581d327f01209141bc \
--hash=sha256:cb7793f06525ca054fcc6039afd93e23b82228b880d0b1301ce635f7f3ed2edf \
--hash=sha256:d50b984c3f85e409e692b156132721522d4e8cf9b6c25e0cf927eea2dfb39487 \
--hash=sha256:fded35fba636c4916fec84aa7c6840ad2e75d211462feb3e966f9545a59d56e6
pyqt6-webengine==6.8.0 \
--hash=sha256:5b9231b58014965b72504e49f39a6dbc3ecd05d4d725af011d75e6c8a7e2d5f7 \
--hash=sha256:64045ea622b6a41882c2b18f55ae9714b8660acff06a54e910eb72822c2f3ff2 \
--hash=sha256:c549f0f72c285eeea94000f6764dfaebf6bb3b13224580c7169a409bf1bf1bb7 \
--hash=sha256:c7a5731923112acf23fbf93efad91f7b1545221063572106273e34c15a029fe7 \
--hash=sha256:d7366809d681bcc096fa565f2a81d0ab040f7da5bb4f12f78e834a2b173c87d1
# via -r requirements.qt6_lin.in
pyqt6-webengine-qt6==6.6.2 \
--hash=sha256:27b1b6a6f4ea115b3dd300d2df906d542009d9eb0e62b05e6b7cb85dfe68e9c3 \
--hash=sha256:3da4db9ddd984b647d0b79fa10fc6cf65364dfe283cd702b12cb7164be2307cd \
--hash=sha256:5d6f3ae521115cee77fea22b0248e7b219995390b951b51e4d519aef9c304ca8 \
--hash=sha256:f2364dfa3a6e751ead71b7ba759081be677fcf1c6bbd8a2a2a250eb5f06432e8
pyqt6-webengine-qt6==6.8.1 \
--hash=sha256:0405b6ce35f406affb27547c6c3608dc82405568af71505fefae4081c8b4ac39 \
--hash=sha256:0ced2a10433da2571cfa29ed882698e0e164184d54068d17ba73799c45af5f0f \
--hash=sha256:79f67a459ecb452f865e04f19122a1d6f30c83d9a1ffd06e7e6f0d652204083a \
--hash=sha256:8059118591641cc9da6616343d893c77fbd065bef3e0764679543345e2c75123 \
--hash=sha256:e36574aa55b30633a12aa000835f01e488a0f0c13513fd9a0d50c2281e0a9068
# via
# -r requirements.qt6_lin.in
# pyqt6-webengine
10 changes: 5 additions & 5 deletions python/requirements.qt6_mac.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pyqt6==6.6.1
pyqt6-qt6==6.6.2
pyqt6-webengine==6.6.0
pyqt6-webengine-qt6==6.6.2
pyqt6_sip==13.6.0
pyqt6==6.8.0
pyqt6-qt6==6.8.1
pyqt6-webengine==6.8.0
pyqt6-webengine-qt6==6.8.1
pyqt6_sip==13.9.1
Loading

0 comments on commit 5d150c7

Please sign in to comment.