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

flatpak-pip-generator generate empty manifest for pip #302

Open
hfiguiere opened this issue Jul 10, 2022 · 5 comments
Open

flatpak-pip-generator generate empty manifest for pip #302

hfiguiere opened this issue Jul 10, 2022 · 5 comments

Comments

@hfiguiere
Copy link
Collaborator

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 flathub/org.freecadweb.FreeCAD#88

@hfiguiere hfiguiere added the bug label Jul 10, 2022
@muelli
Copy link
Member

muelli commented Jul 12, 2022

Just telling from the symptoms, this may be similar to #265

@TingPing
Copy link
Member

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.

@hfiguiere
Copy link
Collaborator Author

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.

It's not in the runtime, it's in the SDK. Which is why I need it.

@tinywrkb
Copy link
Contributor

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).

@JakobDev
Copy link
Contributor

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.

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

5 participants