-
Notifications
You must be signed in to change notification settings - Fork 108
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
flatpak-pip-generator does not download arch independent packages #311
Comments
Having this issue too, but on manjaro, but for a different dependency. The link that is causing my issue is "https://pypi.org/pypi/shiboken2-5.15.2.1/5.15.2/json" (I just printed the url before line 72). The actual package its meant to fetch is "https://pypi.org/pypi/shiboken2/5.15.2/json", so this seems to be some sort of error caused by " " being replaced with "-" (at least in my case). |
Seems to be an issue with the get_package_name module processing the value "shiboken2-5.15.2.1-5.15.2-cp35.cp36.cp37.cp38.cp39.cp310-abi3-manylinux1_x86_64.whl". More specifically line 89 to 102: 89 elif filename.endswith('whl'):
90 segments = filename.split('-')
91 if len(segments) == 5:
92 return segments[0]
93 candidate = segments[:len(segments) - 4]
94 # Some packages list the version number twice
95 # e.g. PyQt5-5.15.0-5.15.0-cp35.cp36.cp37.cp38-abi3-manylinux2014_x86_64.whl
96 if candidate[-1] == segments[len(segments) - 4]:
97 return '-'.join(candidate[:-1])
98 return '-'.join(candidate)
99 else:
100 raise Exception(
101 'Downloaded filename: {} does not end with bz2, gz, xz, zip, or whl'.format(filename)
102 ) ``` |
I have found the issue, "shiboken2-5.15.2.1-5.15.2-cp35.cp36.cp37.cp38.cp39.cp310-abi3-manylinux1_x86_64.whl" gets broken down into if candidate[-1].__contains__(segments[len(segments) - 4]) | segments[len(segments) - 4].__contains__(candidate[-1]): More errors follow this however, so I'll look into those. |
The program then throws the error:
This is correct, as the page does not have any source files directly on it, however it does have a link to a repository, this appears in the https://pypi.org/pypi/shiboken2/5.15.2/json file as a |
I made the change you suggested, but the error message I got remained unchanged. This does not work for my original problem. Also, I replaced line 95, not 96. Maybe my editor counts lines different from yours. |
No I think I'd added a print command while debugging higher up in the program so it makes sense it would be 95 for you. |
I came back to this today. Below is some of my output again.
can somebody tell me what this means? |
Hi, so the answer to my problem is complex. I want to use a python library that is like pytorch. This library is not on a public repository, and only has wheels available for download. At the same time there are other packages from python I'm interested in. The program flatpak-pip-generator does not complete it's work. It cannot find the repository for torch for the arch independent package. The problem, if you ask me, is that the flatpak-pip-generator does not print the 'generated-sources' file for the other libraries I'm interested in. I think it should tell you it cannot find the source for one, but then go on to specify the arch independent packages for the others in the output file. As it is now, the entire file is useless if just one of the files cannot be found. Then, if I want to I can go to the central yaml manifest file and try to download the wheel for the package that upset the flatpak-pip-generator program myself. This might be done by specifying a special flag on the command line when running flatpak-pip-generator. If you ask me, something like this would be useful. |
Just updating this ticket to indicate I am experiencing this issue on Ubuntu 22.04 running:
(fpg.py is my renaming of the contents of the flatpak-pip-generator.py file) Output:
The error seems self-explanatory considering no platform-independent option exists for PySide2: https://pypi.org/project/PySide2/#files Not sure how this might be resolved. The requirements file is online for testing: https://github.com/dictation-toolbox/Caster/blob/master/requirements-mac-linux.txt |
You can use --ignore-pkg on it to exclude. Pyside2 doesn't have any aarch64 wheels either, if you're building for both arches it needs to be built from source, follow https://github.com/flathub/org.freecadweb.FreeCAD/blob/105074876d9b26ab0469d6b68589faeeff2fd59a/org.freecadweb.FreeCAD.yaml#L35 Otherwise take the changes from #331 and you'll get only x86_64 support. |
PySide2 is a big sore point because the package is only design to build on the developer system. and version 5.15 require clang 15 or lower or you get incomprehensible errors. we shall feel grateful the last two release build with python 3.11... tl;dr PySide WILL have to be built it's own way. and it takes a while. |
flatpak-builder version
1.2.2
Linux distribution and version
Ubuntu 22.04
Affected flatpak-builder tool
pip/flatpak-pip-generator
flatpak-builder tool cli args
-r ./../py/requirements.txt --output py-package
Source repository URL
No response
Flatpak-builder manifest URL
No response
Description
This is the flatpak-pip-generator call.
This is the requirements.txt. You can see, I've tried to use torch as a requirement:
If I remove the --runtime option from the flatpak-pip-generator call and use the requirements.txt file, I get a lot of output that ends up here:
I'm not really sure what causes the HTTP Error.
The text was updated successfully, but these errors were encountered: