flatpak-pip-generator generate empty manifest for pip
flatpak-builder version
1.2.2 (or flatpak)
Linux distribution and version
Fedora 36 in toolbox for the tools. Silverblue for the build.
Affected flatpak-builder tool
pip/flatpak-pip-generator
flatpak-builder tool cli args
./pip/flatpak-pip-generator pip
Source repository URL
No response
Flatpak-builder manifest URL
No response
Description
$ ./pip/flatpak-pip-generator pip
========================================================================
Downloading sources
========================================================================
Running: "pip3 download --exists-action=i --dest /tmp/pip-generator-python3-pip13j7ehox -r /tmp/requirements.x7rs4t1n"
Collecting pip
Downloading pip-22.1.2-py3-none-any.whl (2.1 MB)
|████████████████████████████████| 2.1 MB 2.4 MB/s
Saved /tmp/pip-generator-python3-pip13j7ehox/pip-22.1.2-py3-none-any.whl
Successfully downloaded pip
WARNING: You are using pip version 21.3.1; however, version 22.1.2 is available.
You should consider upgrading via the '/var/home/hub/source/flatpak-builder-tools/venv/bin/python3 -m pip install --upgrade pip' command.
========================================================================
Downloading arch independent packages
========================================================================
========================================================================
Obtaining hashes and urls
========================================================================
Generating hash for pip-22.1.2-py3-none-any.whl
Extracting download url for pip
========================================================================
Generating dependencies
========================================================================
Output saved to python3-pip.json
⬢[hub@toolbox flatpak-builder-tools]$ cat python3-pip.json
{
"name": "python3-pip",
"buildsystem": "simple",
"build-commands": [],
"modules": []
}
Why do I need pip? It seem that the addon-manager for FreeCAD wants it. In theory it would install the package in some known XDG location.
See https://github.com/flathub/org.freecadweb.FreeCAD/issues/88
Just telling from the symptoms, this may be similar to https://github.com/flatpak/flatpak-builder-tools/issues/265
pip is on the blacklist because its in the runtime. We should just change it so the blacklist is ignored when the user explicitly passes it.
pipis on the blacklist because its in the runtime. We should just change it so the blacklist is ignored when the user explicitly passes it.
It's not in the runtime, it's in the SDK. Which is why I need it.
It's not enough to generate the module, the build-command should pass --ignore-installed to pip, as pip will not install the Python module if it's available in the runtime (SDK during installation).
This --ignore-installed option is needed with other Python modules that exist in the SDK but not in the Platform runtime, e.g. Pygments.
Also, pip will refuse (I'm not sure if always) to install a more recent version of a Python module if it's already in the runtime, and this version might be needed as a dependency.
I hit this exact issue with setuptools-rust needing updated setuptools.
This does not affect me much, as I tend to avoid flatpak-pip-generator if I can, and instead use f-e-d-c with the PyPi checker and architecture agnostic wheel releases (help avoid some build dependencies).
I suggest that you use the SDK as Runtime. Some pip packages need to be compiled. The SDK includes pip and everything that is needed to compile a Python Package that contains C/C++ code and don't provide a binary.