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

assert failure when wheel has no arch? #84

Open
cbm755 opened this issue Sep 24, 2024 · 0 comments
Open

assert failure when wheel has no arch? #84

cbm755 opened this issue Sep 24, 2024 · 0 comments

Comments

@cbm755
Copy link
Collaborator

cbm755 commented Sep 24, 2024

I ran:

 req2flatpak --requirements \
         platformdirs==4.3.6 \
         --target-platforms "311-x86_64 311-aarch64" --outfile python3-platformdirs.yaml
Traceback (most recent call last):
  File "/home/cbm/.local/bin/req2flatpak", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/cbm/.local/lib/python3.12/site-packages/req2flatpak.py", line 741, in main
    PlatformFactory.from_string(platform) for platform in options.target_platforms
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cbm/.local/lib/python3.12/site-packages/req2flatpak.py", line 264, in from_string
    return cls.from_python_version_and_arch(minor_version=int(minor), arch=arch)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cbm/.local/lib/python3.12/site-packages/req2flatpak.py", line 286, in from_python_version_and_arch
    assert arch in ["x86_64", "aarch64"]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

I assume this is because the wheel is not arch-specific. Here's the yaml from an older version of req2flatpak, not sure which one, b/c we don't record version info.

# Generated by req2flatpak.py --requirements platformdirs==4.2.2 --target-platforms 311-x86_64 311-aarch64 --outfile python3-platformdirs.yaml
name: python3-package-installation
buildsystem: simple
build-commands:
- pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}"
  --prefix=${FLATPAK_DEST} --no-build-isolation platformdirs
sources:
- type: file
  url: https://files.pythonhosted.org/packages/68/13/2aa1f0e1364feb2c9ef45302f387ac0bd81484e9c9a4c5688a322fbdfd08/platformdirs-4.2.2-py3-none-any.whl
  sha256: 2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee
@cbm755 cbm755 changed the title assert failure when wheel is not assert failure when wheel has no arch? Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant