Re: Many packages unnecessarily link to libpython

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

 



On pe, 15 touko 2020, Charalampos Stratakis wrote:
Hello everyone,

As of Python 3.8, python C extensions modules should not link to
libpython, unless they embed the interpreter in their code. Relevant
upstream PR: https://github.com/python/cpython/pull/12946 If your
package links to libpython without requiring it, it won't be possible
to use the python3-debug binary with your python C extension, unless
you recompile the extension against it.

On Fedora Rawhide, there are at this point 144 packages linking to
libpython, many of those possibly without any need for it.

If your package links to libpython but it does not embed the
interpreter, I would like to ask you to unlink it. Usually the fix
needs to be done at the package's build system.

If you are not sure if your package links to libpython, a way to figure
this out  is to inspect the code for the Py_Initialize and the
Py_Finalize calls [0]. If the code includes those calls, no action is
required from your side. If it does not, linking to libpython is not
required.

I might mass file bugzillas at a later date, but I wanted to provide
you the heads up before that.

[0] https://docs.python.org/3/c-api/init.html#initializing-and-finalizing-the-interpreter

List of possibly affected packages, provided through $ repoquery
--repo=rawhide --source --whatrequires 'libpython3.8.so.1.0()(64bit)'

Samba does use Py_Initialize and thus link correctly.



--
/ Alexander Bokovoy
Sr. Principal Software Engineer
Security / Identity Management Engineering
Red Hat Limited, Finland
_______________________________________________
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