Bug 1465991 - Python3 support
Python3 support
Status: NEW
Product: Fedora
Classification: Fedora
Component: perl-Inline-Python (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jon Kerr Nilsen
Fedora Extras Quality Assurance
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2017-06-28 11:57 EDT by Petr Pisar
Modified: 2017-06-29 02:55 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Petr Pisar 2017-06-28 11:57:20 EDT
perl-Inline-Python-0.54-1.fc27 is built against Python 2. It would be great to build it for Python3. Upstream supports Python3.

The issue is that Makefile.PL has some checks that does work in Fedora.

First one must to override the python executable with INLINE_PYTHON_EXECUTABLE environment variable.

Second it fails because it cannot find Python3 library:

$ INLINE_PYTHON_EXECUTABLE=/usr/bin/python3 perl Makefile.PL
Using /usr/bin/python3

This python's configuration files are messed up. You'll have have to
answer the questions yourself. Here is what Python said:

   Extra Libs:  -lpthread -ldl  -lutil
   Python Library:  /usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a
   Include Path:    /usr/include/python3.6m

        1. LIBS option. I need to know what extra libraries, if any,
           are required by this build of python. I recommend this:
           -lpthread -ldl  -lutil

The /usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a file does not exist. Fedora has /usr/lib64/libpython3.6m.so. It's possible that the check is bogus because it should check for a shared library.

Commenting out (-f join '/', $ref->{libpath}, $ref->{libpython}) test in Makefile.PL allows to build against Python 3 and all tests pass.

In case of Python 2, it checks for /usr/lib64/python2.7/config/libpython2.7.so which is a symlink to /usr/lib64/libpython2.7.so.
In case of Python 3, there is no such symlink.
Comment 1 Petr Pisar 2017-06-29 02:55:41 EDT
Python recommends using pythonX-config tool for discovering compiler and linker flags <https://docs.python.org/3/extending/embedding.html#compiling-and-linking-under-unix-like-systems>.

Note You need to log in before you can comment on or make changes to this bug.