Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Briefcase build in Github Actions with docker can't find PyQt6 package for Linux #945

Closed
gambhiro opened this issue Oct 30, 2022 · 3 comments
Labels
bug A crash or error in behavior. linux The issue relates Linux support.

Comments

@gambhiro
Copy link

Describe the bug

When building in Github Actions (default briefcase settings with docker), on Linux it can't find the PyQt6 package, and tries to build it from source.

To Reproduce

Example workflow action:

https://github.com/gambhiro/pyqt6-build-example/blob/main/.github/workflows/briefcase_build_docker.yml

From the build log:

[smallapp] Entering Docker context...
WARNING: The directory '/home/brutus/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Collecting PyQt6<6.5.0,>=6.4.0
  Downloading PyQt6-6.4.0.tar.gz (1.0 MB)

The --no-docker option is a workaround, after installing the required system dependencies.

https://github.com/gambhiro/pyqt6-build-example/blob/main/.github/workflows/briefcase_build.yml

Expected behavior

It should recognize the correct platform arch and use the published wheel packages.

https://pypi.org/project/PyQt6/#files

@gambhiro gambhiro added the bug A crash or error in behavior. label Oct 30, 2022
@rmartin16 rmartin16 added the linux The issue relates Linux support. label Oct 30, 2022
@rmartin16
Copy link
Member

rmartin16 commented Oct 30, 2022

The docker image is based on Ubuntu 18.04 which uses GLIBC 2.27. The manylinux wheel for PyQT6==6.4.0 was built for GLIBC 2.28. This appears to be the first PyQT6 release doing this since other releases were distributing manylinux1 wheels.

While the manylinux project established manylinux_2_24, that proved problematic and will be dropped altogether 1 jan 2023.

manylinux_2_28 was introduced 30 may 2022 and as it becomes more popular, more packages will fall in to the same bucket (obviously).

@freakboy3742
Copy link
Member

As @rmartin16 has identified, this problem is largely in the hands of PyQt - they've released a binary package that can only work with very recent versions of Linux. That's in direct opposition to the goals of Briefcase, which aims to make applications that are usable by as many people as possible.

Three possible approaches for resolving this issue that are in your control:

  1. Add the Ubuntu 18.04 system dependencies required to compile PyQt6 to the system_requires setting, installation from source should succeed, without the need to use --no-docker. This effectively means you're building the wheel that PyQt6 isn't providing. I don't know what packages are required to do this; you'll need to consult PyQt6's documentation.
  2. Use Flatpak, rather than AppImage. I don't know whether this is viable for your use case.
  3. Modify the briefcase-linux-appimage-template to use an Ubuntu-22.04 base, build the Python-Linux-support package using an ubuntu-22.04 base, and then specify a custom template and support_package in your pyproject.toml.

I'm going to close this ticket as "wontfix" on the basis that Briefcase is, in this case, working as expected; however, I've opened #947 for addressing the more general problem of making the adoption of more recent base images for Linux apps a configurable option.

@gambhiro
Copy link
Author

Thanks for the tips on alternative approaches!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash or error in behavior. linux The issue relates Linux support.
Projects
None yet
Development

No branches or pull requests

3 participants