I'm not a python developer but I do maintain several packages that use python and I've been unable to find clear documentation / guidelines for Fedora on how to package software that requires pip...
The closest I've found is: https://fedoraproject.org/wiki/PythonWheels
Traditionally building a package should not require internet access as everything needed to build the package is supposed to be in the source RPM. It looks like with the increase in use of things like GO, nodejs, and now pip, that's no longer appears to be really practical.
Am I missing something that google hasn't helped me find? Or are the packaging guidelines struggling to keep up with how fast things are changing?
Thanks, Richard
On 17.8.2017 15:02, Richard Shaw wrote:
I'm not a python developer but I do maintain several packages that use python and I've been unable to find clear documentation / guidelines for Fedora on how to package software that requires pip...
The closest I've found is: https://fedoraproject.org/wiki/PythonWheels
What you actually want is:
https://fedoraproject.org/wiki/Packaging:Python
Traditionally building a package should not require internet access as everything needed to build the package is supposed to be in the source RPM. It looks like with the increase in use of things like GO, nodejs, and now pip, that's no longer appears to be really practical.
That's the way how RPMs (in Fedora at least) work. If you want to package pip installable software, you need to package all the dependencies first.
However the question is: Why do you want to package this software in the first place? Is it for personal use or do you actually want to make this be available in Fedora?
What is the software?
Am I missing something that google hasn't helped me find? Or are the packaging guidelines struggling to keep up with how fast things are changing?
Thanks, Richard _______________________________________________ python-devel mailing list -- python-devel@lists.fedoraproject.org To unsubscribe send an email to python-devel-leave@lists.fedoraproject.org
On 17 August 2017 at 23:02, Richard Shaw hobbes1069@gmail.com wrote:
I'm not a python developer but I do maintain several packages that use python and I've been unable to find clear documentation / guidelines for Fedora on how to package software that requires pip...
The closest I've found is: https://fedoraproject.org/wiki/PythonWheels
Traditionally building a package should not require internet access as everything needed to build the package is supposed to be in the source RPM. It looks like with the increase in use of things like GO, nodejs, and now pip, that's no longer appears to be really practical.
This is mixing up a few different points:
1. Python level requirements can be translated to RPM level "Requires: pythonXYdist(PyPI-package-name)" requirements if the dependency is packaged in Fedora (where "XY" = the target Python version) 2. pyp2rpm (see https://pypi.python.org/pypi/pyp2rpm) will attempt to generate appropriate dependency entries for you 3. Application software that is designed to be deployed as a standalone Python virtual environment can still be packaged as a (non-Fedora) SRPM that doesn't require internet access during the build phase by doing the following:
- use pip download to get all the relevant source packages - add the project *and its dependencies* to the SRPM as SourceN entries (alternatively, bundle the deps into a single archive for ease of extraction) - create the virtual environment in %build, install the project and its dependencies, and package *that* as the RPM
We're actually having some occasional discussions about how we might be able to incorporate that last approach into the official Fedora guidelines for cases where a Python level dependency *isn't* shared, and is instead specific to that application.
Cheers, Nick.
python-devel@lists.fedoraproject.org