Bug 1900858
Summary: | Add virtual provides for installed Python modules | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ben Beasley <code> | ||||||
Component: | fontforge | Assignee: | Parag Nemade <pnemade> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | low | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | rawhide | CC: | fonts-bugs, kevin, paul, pnemade | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | fontforge-20200314-10.fc34 | Doc Type: | If docs needed, set a value | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2020-11-28 03:53:28 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Ben Beasley
2020-11-23 20:48:59 UTC
I got curious to know what other packages you found that can use these virtual provides in Fedora? That’s an interesting question. I only stumbled on this detail for fontforge while studying dependencies for gftools (Google Fonts Tools). In response to your question, I wrote a script, to be attached as possible-missing-py_provides.py, to look for packages that might be in a similar situation. It takes a long time to run, but I was not in a hurry. The result is to be attached as possible-missing-py_provides.txt. Importantly, this list is just based on a heuristic and probably has quite a lot of false positives. For example, some of these Python modules or packages might be designed only to support a particular application. While the Fedora guidelines do not call out this case as an exception, it doesn’t seem useful to worry about cases where the Python module or package does not provide a public API, i.e., is not designed to be imported by code outside the application. For example, yamllint provides a Python package of the same name, but https://yamllint.readthedocs.io/en/stable/quickstart.html does not advertise a Python API. Manual review of documentation is required to identify such cases. A lot of cases in this list are those where the module name on PyPI is not the same as the imported module, which is a case the guidelines specifically talk about: > For any module foo intended to be used in Python 3 with import foo, the package that includes it should provide python3-foo. This is of course always the case if the subpackage is named python3-foo (as in the examples below). If the subpackage has some other name, then Provides: python3-foo should be added explicitly (via %py_provides python3-foo, see below). For example, python3-sphinx-notfound-page provides a Python package of the same name (sphinx-notfound-page on PyPI), and python3dist(sphinx-notfound-page) and so on, but the package that is imported is simply named notfound, so by my reading of the guidelines it should have %py_provides python3-notfound. Created attachment 1734153 [details]
Script to look for similar cases (slowly)
Created attachment 1734154 [details]
Possible similar cases on Fedora 33
Okay so you just wanted this package to add virtual provides. I have been knowing this missing virtual provides for sometime for this package. I was just waiting for someone to complain it. I could not find a single package in Fedora yet that needs python3-psMat or python3-fontforge as a dependency package. Anyways thanks for this bug :) Ah, you were just asking about fontforge! That’s a much easier question. At least as of F33, it looks like mftrace is the only package with a fontforge dependency, and it does use the CLI. I think gftools (when I get all the other dependencies lined up) will therefore be the first to use the fontforge Python module. Ah you are right. Sorry I confused you. I found that I was wrongly looking into RHEL8 repository query only but in Fedora you are right mftrace requires: fontforge package. One more reason I needed that information is to think in future if I can split fontforge into python3-fontforge subpackage actually. Thank you. |