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

Allow arch dependent packages #331

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AndersBlomdell
Copy link

Adds two new options to flatpak-pip-generator:

--arch-dependent-allow Allow arch dependent packages to be used
if no arch-independent package can be found.
#328
--arch-dependent-force Force arch dependent packages to always be used,
Useful if the Sdk doesn't have the tools to rebuild
the arch independent package

Adds two new options to flatpak-pip-generator:

  --arch-dependent-allow  Allow arch dependent packages to be used
                          if no arch-independent package can be found.
                          flatpak#328
  --arch-dependent-force  Force arch dependent packages to always be used,
                          Useful if the Sdk doesn't have the tools to rebuild
                          the arch independent package
parser.add_argument('--arch-dependent-allow', action='store_true',
help='Allow arch dependent packages to be used')
parser.add_argument('--arch-dependent-force', action='store_true',
help='Force arch dependent packages to be used')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README.md should have entries on these new parameters

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: shouldn't this have options to choose which arches are we targeting? Likes of arches-only and skip-arches?

Otherwise LGTM.

Copy link
Contributor

@bbhtt bbhtt Dec 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: shouldn't this have options to choose which arches are we targeting? Likes of arches-only and skip-arches?

Otherwise LGTM.

That seems complicated and a future work. Currently, pip download cannot download a package for another arch unless you specify the whole pep 600 platform tag, eg. pip download --platform=manylinux_2_31_aarch64 --only-binary=:all: shiboken6

The tag varies from package to package due to the glibc version/package availability. There is also linux_aarch64/musllinux apart from manylinux.

There's also an issue where pip download doesn't handle legacy manylinux tag aliases too well pypa/pip#10760

It would need

a) Heuristics for guessing what value to pass to --platform

b) Modifying flatpak_cmd, based on (a)

I think for now it should be left to host/pip.

@bbhtt
Copy link
Contributor

bbhtt commented Dec 15, 2023

Hi @TingPing, can you please review this? A few latest submissions on Flathub are hitting the issue while trying to use pip-generator for pyside6/shiboken

The only thing I don't like here is the generated manifest is usually copy-pasted without checking. If the flatpak is being built for multiple arches, the build will fail much later. But I don't know how to make that obvious here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants