Re: Packages that failed to build with Python 3.9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31. 05. 20 13:13, Zbigniew Jędrzejewski-Szmek wrote:
On Sun, May 31, 2020 at 01:09:31PM +0200, Miro Hrončok wrote:
On 31. 05. 20 13:04, Zbigniew Jędrzejewski-Szmek wrote:
On Sun, May 31, 2020 at 10:49:28AM -0000, Leigh Scott wrote:
Even if the package builds it doesn't mean it's functional.

$ cinnamon-settings
Traceback (most recent call last):
    File "/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py", line 16, in <module>
      from setproctitle import setproctitle
ImportError: /usr/lib64/python3.9/site-packages/setproctitle.cpython-39-x86_64-linux-gnu.so: undefined symbol: Py_GetArgcArgv

Idea for a global gating test for packages:
for rpm in $rpms; do
      python3 -c "$(rpm -qP $rpm | sed -n -r 's/python3dist\((.*)\).*/import \1/p')"
done

Unfortunately, this has a wrong assumption: python3dist(xxx) doesn't mean
there is an xxx module to import. See for example:

python3-beautifulsoup4 provides python3.9dist(beautifulsoup4) but is
imported as bs4. (I have plenty more examples like this... including
python-fedora.)

A better thing might be to query for .py files, .so files and directories
with such in %{python_sitelib}/%{python_sitearch}.

I always thought python3dist(foo) means that the package provides the
foo module, so that if I want to install foo module, I can rely on this
provides.

This is a very common misconception. That's why we want to explain this better in the new Python guidelines:

https://lists.fedoraproject.org/archives/list/python-devel@xxxxxxxxxxxxxxxxxxxxxxx/message/ZCNUQBJLDUJUJXK2EOPP2MWL6FJKLBPS/

Particularly:

-------------------------------------------

Python packages have several different names, which should be kept in sync but will sometimes differ for historical or practical reasons. They are:
* the Fedora *source package name* (or *component name*, %{name}),
* the Fedora *built RPM name*,
* the *project name* used on *PyPI* or by *pip*, and
* the *importable module name* used in Python (a single package may have multiple importable modules).

Some examples (both good and worse):

| Fedora component  | Built RPM          | Project name  | Importable module   |
| ----------------- | ------------------ | ------------- | ------------------- |
| `python-requests` | `python3-requests` | `requests`    | `requests`          |
| `PyYAML`          | `python3-pyyaml`   | `pyyaml`      | `yaml`              |
| `python-ldap`     | `python3-ldap`     | `python-ldap` | `ldap`, `ldif`, etc.|
| `python-pillow`   | `python3-pillow`   | `pillow`      | `PIL`               |

-------------------------------------------

python3dist() holds the "project name" (more specifically, the canonical form).

We use upstream metadata to generate python3.Xdist() requires. Upstreams specify dependencies in project names, not importable module names.


--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux