Bug 1772988 - python3-config --configdir incorrect
Summary: python3-config --configdir incorrect
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python3
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Victor Stinner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-15 18:29 UTC by Alex Scheel
Modified: 2020-06-22 07:30 UTC (History)
11 users (show)

Fixed In Version: python3-3.7.7-3.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-22 07:30:59 UTC
Type: Bug


Attachments (Terms of Use)

Description Alex Scheel 2019-11-15 18:29:40 UTC
Description of problem:

On Fedora 31 x86_64 (I haven't checked other versions) on all Python versions (python3.8, 3.7, and 3.6), the following command displays incorrect information:

> $ python3.6-config --configdir
> /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu
> $ python3.7-config --configdir
> /usr/lib/python3.7/config-3.7m-x86_64-linux-gnu
> $ python3.8-config --configdir
> /usr/lib/python3.7/config-3.8-x86_64-linux-gnu

In all cases it points to /usr/lib, when it should point to /usr/lib64, where the file actually exists. E.g.:

> $ ls -alh /usr/lib/python3.7/config-3.7m-x86_64-linux-gnu
> ls: cannot access '/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu': No such file or directory
> $ ls -alh /usr/lib64/python3.7/config-3.7m-x86_64-linux-gnu
> total 228K
> drwxr-xr-x.  3 root root 4.0K Nov  2 12:41 .
> drwxr-xr-x. 31 root root  12K Nov  2 12:41 ..
> drwxr-xr-x.  2 root root 4.0K Nov  2 12:41 __pycache__
> -rw-r--r--.  1 root root 3.4K Oct 17 07:30 config.c
> -rw-r--r--.  1 root root 1.6K Oct 14 18:32 config.c.in
> -rwxr-xr-x.  1 root root 7.0K Oct 14 18:32 install-sh
> -rw-r--r--.  1 root root  74K Oct 17 07:30 Makefile
> -rwxr-xr-x.  1 root root 7.7K Oct 14 18:32 makesetup
> -rwxr-xr-x.  1 root root 1.9K Oct 17 07:30 python-config.py
> -rw-r--r--.  1 root root  82K Oct 17 08:16 python.o
> -rw-r--r--.  1 root root  15K Oct 17 07:30 Setup
> -rw-r--r--.  1 root root   41 Oct 17 07:30 Setup.local


This works fine on Debian (namely, `python3-config --configdir` points to a directory that exists). 

Version-Release number of selected component (if applicable):

python3-3.7.5-1.fc31.x86_64
python36-3.6.9-2.fc31.x86_64
python38-3.8.0-1.fc31.x86_64

How reproducible:

Very

Steps to Reproduce:
1. Run python3-config --configdir
2. Try ls-ing the printed path path.

Actual results:

Returned directory doesn't exist. :o /o\


Expected results:

Returned directory should exist!

Comment 1 Miro Hrončok 2019-11-15 22:39:35 UTC
Thanks for the report! I acknowledge that this is a bug.

Comment 2 Victor Stinner 2019-11-18 13:56:55 UTC
> $ python3.8-config --configdir
> /usr/lib/python3.7/config-3.8-x86_64-linux-gnu

Strange, I get a different result on Fedora 31 with python38-3.8.0-1.fc31.x86_64:

$ python3.8-config --configdir
/usr/lib64/python3.8/config-3.8-x86_64-linux-gnu

$ ls /usr/lib64/python3.8/config-3.8-x86_64-linux-gnu
config.c  config.c.in  install-sh*  Makefile  makesetup*  __pycache__/  python-config.py*  python.o  Setup  Setup.local


> In all cases it points to /usr/lib, when it should point to /usr/lib64, where the file actually exists. E.g.:

I confirm the issue with python3-3.7.5-1.fc31.x86_64:

$ python3-config --configdir
/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu
$ ls /usr/lib/python3.7/config-3.7m-x86_64-linux-gnu
ls: cannot access '/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu': No such file or directory
$ ls /usr/lib/python3.7/
site-packages/

It's an issue in the python3-config program, the directory exists:

$ ls /usr/lib64/python3.7/config-3.7m-x86_64-linux-gnu
config.c  config.c.in  install-sh*  Makefile  makesetup*  __pycache__/  python-config.py*  python.o  Setup  Setup.local

Comment 3 Alex Scheel 2019-11-18 15:01:34 UTC
Ah no, I think you're right here. Weird, I thought I had this issue with 3.8 but I guess I'm not able to reproduce it any more.

Comment 4 Petr Viktorin 2020-01-07 15:06:02 UTC
It probably doesn't make sense to backport to older Pythons/Fedoras.
Please reopen if you disagree.

Comment 5 Victor Stinner 2020-04-03 17:19:55 UTC
Python 3.6 on RHEL 8 is also impacted: bz#1772992.

I reopen this issue to first fix the bug in python37 package of Rawhide:
https://src.fedoraproject.org/rpms/python37/pull-request/45 fix.

My plan is then to backport the fix to fc32 and fc31, and then to RHEL Python 3.6.

Comment 6 Victor Stinner 2020-04-03 17:25:48 UTC
This issue was fixed downstream in Python 3.8 to solve bz#1710767:
https://src.fedoraproject.org/rpms/python3/c/7aab0ddc87c4c8476c8077800e765e52480fbc4d?branch=master

But Python 3.7 and older were not fixed.

Comment 7 Fedora Update System 2020-06-03 18:15:40 UTC
FEDORA-2020-91aa1ba2f7 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-91aa1ba2f7

Comment 8 Fedora Update System 2020-06-03 18:15:41 UTC
FEDORA-2020-865971c39b has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-865971c39b

Comment 9 Fedora Update System 2020-06-04 03:00:45 UTC
FEDORA-2020-91aa1ba2f7 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-91aa1ba2f7`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-91aa1ba2f7

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2020-06-04 04:08:51 UTC
FEDORA-2020-865971c39b has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-865971c39b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-865971c39b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2020-06-05 12:16:48 UTC
FEDORA-2020-2112eaed6c has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-2112eaed6c

Comment 12 Fedora Update System 2020-06-05 12:22:32 UTC
FEDORA-2020-f8b74a5300 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-f8b74a5300

Comment 13 Fedora Update System 2020-06-07 21:44:39 UTC
FEDORA-2020-f8b74a5300 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-f8b74a5300`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-f8b74a5300

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2020-06-08 01:45:58 UTC
FEDORA-2020-2112eaed6c has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-2112eaed6c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-2112eaed6c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2020-06-11 22:57:04 UTC
python37-3.7.7-3.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2020-06-14 17:01:53 UTC
python36-3.6.10-5.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2020-06-14 17:10:48 UTC
python36-3.6.10-5.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2020-06-22 07:30:59 UTC
FEDORA-2020-f8b74a5300 has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.


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