
jan matejek <jmatejek@suse.com> wrote:
hello,
On 17.8.2016 18:09, Todd Rme wrote:
Fedora is implementing a system to automatically add reliable, distro-agnostic provides to their python packages [1]. This (...) What does everything think about implementing this on our end as well?
yes, let's please do this. :)
+1 ! We already do this for Ruby: https://en.opensuse.org/openSUSE:Packaging_Ruby#How_gem_dependencies_are_aut... (Caveat: since I wrote that doc, the Ruby autoreqprov mechanism has changed at least once, and I am not sure if that doc was correctly updated at the same time. But hopefully it's good enough to give you an idea how it works.)
I am not exactly clear from the discussion what exactly it would entail.
We'd need to extend the autoreqprov generator in our RPM. There is already some python-related code, IIRC, something that can generate provides from files/directories
Yes, this was newly completed in py2pack by Tom: https://github.com/openSUSE/py2pack/pull/45 The next step would be to make this happen automatically at build-time via autoreqprov and macros, instead of at .spec-editing-time.
in site-packages directory.
I don't think site-packages is the right source for this metadata. It should come from the setup.py infrastructure (which may or may not source the dependencies from somewhere like requires.txt).
It would be beneficial to have both: the canonical name from pypi, what fedora is doing now, and also provides for imports -- even though the latter would never be perfect.
I guess the most important part is having the correct dependency names, which means using the pypi names. I'm not sure whether providing virtual packages for import namespace names is a good idea.
Some RPM person please speak up?
Hope the above info helps. I'm sure that any contributions to improve this will be very welcome. Maybe it could be done by extending py2pack somehow so that it gets called in a special mode at build-time to extract the metadata - Tom, what do you think? BTW there is a new github team: https://github.com/orgs/openSUSE/teams/python-packaging Anyone who works on this should probably be added to that team. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org