Skip to content

Commit 6966da1

Browse files
committed
Start installing PyQt6 into the Linux ARM64 venv by default
Now that an ARM wheel is on PyPI, we no longer need to rely on a system PyQt to build on ARM. The install is skipped when PYTHONPATH is set, so older distros with glibc <2.39 can continue to use the system packages instead.
1 parent 256822b commit 6966da1

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

build/configure/src/python.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ pub fn setup_venv(build: &mut Build) -> Result<()> {
2828
]
2929
} else if cfg!(target_os = "macos") {
3030
inputs!["python/requirements.qt6_mac.txt",]
31-
} else if cfg!(all(target_os = "linux", target_arch = "aarch64")) {
32-
// system-provided Qt on ARM64
31+
} else if std::env::var("PYTHONPATH").is_ok() {
32+
// assume we have a system-provided Qt
3333
inputs![]
3434
} else {
3535
// normal linux

docs/linux.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,16 @@ To play and record audio during development, install mpv and lame.
5252

5353
## ARM64 support
5454

55-
Other platforms download PyQt binary wheels from PyPI. There are no PyQt wheels available
56-
for ARM Linux, so you will need to rely on your system-provided libraries instead. Your distro
57-
will need to have Python 3.9 or later.
55+
If you're on a glibc 2.39+ system, you can skip the rest of this section.
5856

59-
After installing the system libraries (eg 'sudo apt install python3-pyqt6.qt{quick,webengine} python3-venv'),
57+
If your system has an older glibc, you won't be able to use the PyQt wheels that are
58+
available in pip/PyPy, and will need to use your system-installed PyQt instead.
59+
Your distro will also need to have Python 3.9 or later.
60+
61+
After installing the system libraries (eg:
62+
'sudo apt install python3-pyqt6.qt{quick,webengine} python3-venv pyqt6-dev-tools'),
6063
find the place they are installed (eg '/usr/lib/python3/dist-packages'). On modern Ubuntu, you'll
61-
need 'sudo apt remove python3-protobuf'. Then before running any commands like './run', tell Anki where
64+
also need 'sudo apt remove python3-protobuf'. Then before running any commands like './run', tell Anki where
6265
the packages can be found:
6366

6467
```

0 commit comments

Comments
 (0)