Bug 1851090 - distutils module: sysconfig.get_config_var('LIBPL') returns non existing directory
Summary: distutils module: sysconfig.get_config_var('LIBPL') returns non existing dire...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: python3
Version: 8.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Python Maintainers
QA Contact: Lukáš Zachar
URL:
Whiteboard:
Depends On: 1851008
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-25 15:17 UTC by Victor Stinner
Modified: 2020-11-04 01:32 UTC (History)
13 users (show)

Fixed In Version: python3-3.6.8-30.el8
Doc Type: Bug Fix
Doc Text:
The python3 -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))" command returns the /usr/lib64/python3.6/config-m-x86_64-linux-gnu path which doesn't exist. With the fix, the command returns the correct path: /usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu ("config-3.6m" instead of "config-m").
Clone Of: 1851008
Environment:
Last Closed: 2020-11-04 01:30:33 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:4433 0 None None None 2020-11-04 01:31:03 UTC

Description Victor Stinner 2020-06-25 15:17:28 UTC
+++ This bug was initially created as a clone of Bug #1851008 +++

Description of problem:
python3-3.7.7-3 introduces a regression in distutils module:

python3-3.7.7-1.fc31:
$ python3 -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"

/usr/lib64/python3.7/config-3.7m-x86_64-linux-gnu

python3-3.7.7-3.fc31:
$ python3 -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"

/usr/lib64/python3.7/config-m-x86_64-linux-gnu

The regression causes Vim to fail to build in F31 branch.

Version-Release number of selected component (if applicable):
python3-3.7.7-3.fc31

How reproducible:
Always

Steps to Reproduce:
See above

Actual results:
prints an incorrect path

Expected results:
prints a correct path

Additional info:

--- Additional comment from Miro Hrončok on 2020-06-25 12:31:52 UTC ---

Thanks for the report. Victor, can you please have a look?

$ python3.6 -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"
/usr/lib64/python3.6/config-m-x86_64-linux-gnu

$ python3.7 -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"
/usr/lib64/python3.7/config-m-x86_64-linux-gnu

$ python3.8 -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"
/usr/lib64/python3.8/config-3.8-x86_64-linux-gnu

--- Additional comment from Victor Stinner on 2020-06-25 14:51:51 UTC ---

Oh no! I broke sysconfig LIBPL variable when fixing "python3-config --configdir" in bz#1772988 :-(

bz#1772988 fixed a first downstream bug, and this issue is about a second downstream bug: the 00178-dont-duplicate-flags-in-sysconfig.patch downstream patch is wrong and should be removed. It causes this bug.

If I revert it, distutils.sysconfig.get_config_var('LIBPL') returns /usr/lib64/python3.7/config-3.7m-x86_64-linux-gnu as expected.

--- Additional comment from Victor Stinner on 2020-06-25 15:02:15 UTC ---

This issue is basically the same than https://bugzilla.redhat.com/show_bug.cgi?id=1710767 which was fixed by removing 00178-dont-duplicate-flags-in-sysconfig.patch in the Python 3.8 package.

I proposed https://src.fedoraproject.org/rpms/python3.7/pull-request/4 to remove the patch.

--- Additional comment from Victor Stinner on 2020-06-25 15:15:42 UTC ---

And https://src.fedoraproject.org/rpms/python3.6/pull-request/4 for Python 3.6.

Comment 1 Victor Stinner 2020-06-25 15:20:52 UTC
In RHEL8, python3 3.6.8-29 has the issue (rhbz#1772992). But it's not really a regression, the bug was already present before the rhbz#1772992 fix. It's just that LIBPL didn't expose the bug previously.

Comment 3 Zdenek Dohnal 2020-06-26 04:25:23 UTC
Hi Victor,

just my 2 cents - I cannot reproduce the bug on RHEL 8.

[root@ci-vm-10-0-138-171 ~]# python3 -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"
/usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu

Unless you have somewhere new python update waiting, RHEL 8 hasn't been affected yet.

Comment 4 Victor Stinner 2020-06-26 11:56:39 UTC
> just my 2 cents - I cannot reproduce the bug on RHEL 8.

The issue is in python3 3.6.8-29 (rhbz#1772992) which is not in repositories yet (it's at the ON_QA stage).

Comment 11 errata-xmlrpc 2020-11-04 01:30:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: python3 security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4433


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