
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2014-08-05 13:28 byMichael.Dussere, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| patch_python_sym_links.txt | rdossin,2015-07-22 10:45 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 3769 | merged | mgorny,2017-09-26 15:13 | |
| PR 3793 | merged | benjamin.peterson,2017-09-28 03:23 | |
| Messages (7) | |||
|---|---|---|---|
| msg224825 -(view) | Author: Michael Dussere (Michael.Dussere) | Date: 2014-08-05 13:28 | |
Our python is installed on a shared directory that is accessed through a symbolic link. $ which python3.4-config/Produits/publics/x86_64.Linux.RH6/python/3.4.1/bin/python3.4-config$ ls -al /Produitslrwxrwxrwx 1 root root 13 Oct 31 2013 /Produits -> /nfs/ProduitsWith this configuration python-config returns a wrong path (it gives a double /nfs prefix)$ python3.4-config --includes-I/nfs/nfs/Produits/publics/x86_64.Linux.RH6/python/3.4.1/include/python3.4m -I/nfs/nfs/Produits/publics/x86_64.Linux.RH6/python/3.4.1/include/python3.4mThe problem is due to a double string replacement in the script prefix_build="/Produits/publics/x86_64.Linux.RH6/python/3.4.1" prefix_real=$(installed_prefix "$0") # Use sed to fix paths from their built-to locations to their installed-to # locations. prefix=$(echo "$prefix_build" | sed "s#$prefix_build#$prefix_real#") exec_prefix_build="${prefix}" exec_prefix=$(echo "$exec_prefix_build" | sed "s#$exec_prefix_build#$prefix_real#") includedir=$(echo "${prefix}/include" | sed "s#$prefix_build#$prefix_real#")for $includedir the replacement of $prefix_build by $prefix_real is applyed twice and since the $prefix_real contains $prefix_build it produce a wrong result.In addition I think it is strange to have lines like the followingprefix=$(echo "$prefix_build" | sed "s#$prefix_build#$prefix_real#") | |||
| msg231307 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2014-11-18 07:19 | |
Do you want to provide a patch? | |||
| msg247108 -(view) | Author: Romain Dossin (rdossin)* | Date: 2015-07-22 10:45 | |
I stumbled across the exact same problem and I have made a fix that is working, at least for the usage I have... | |||
| msg249003 -(view) | Author: Alexey Gorshkov (animus) | Date: 2015-08-23 09:41 | |
I don't understand: Why python-config needs to seek "realpath"? Why python-config is trying to be smarter than one who starts ./configure script?As so, the right thing to this, is remove "smart" parts from python-config. But as for fast hack in to this is replace line 'prefix_real=$(installed_prefix "$0")' with 'prefix_real=$prefix_build'. | |||
| msg303045 -(view) | Author: Michał Górny (mgorny)* | Date: 2017-09-26 15:16 | |
I've submitted a pull request with another fix. I've tried to keep the changes at minimal but I couldn't stand keeping meaningless 'echo $x | sed -e s/$x/$y/' ;-).I have to point out that the attached patch is wrong since it does readlink on CFLAGS &c. | |||
| msg303096 -(view) | Author: Benjamin Peterson (benjamin.peterson)*![]() | Date: 2017-09-27 05:45 | |
New changeset14086cfc5eed8c5e78342d79e5db87a135d75fa8 by Benjamin Peterson (Michał Górny) in branch 'master':closesbpo-22140: Prevent double substitution of prefix in python-config.sh (#3769)https://github.com/python/cpython/commit/14086cfc5eed8c5e78342d79e5db87a135d75fa8 | |||
| msg303188 -(view) | Author: Benjamin Peterson (benjamin.peterson)*![]() | Date: 2017-09-28 03:27 | |
New changeset68b131d5b674549bb637b366730497714ad11328 by Benjamin Peterson in branch '3.6':[3.6] closesbpo-22140: Prevent double substitution of prefix in python-config.sh (GH-3769) (#3793)https://github.com/python/cpython/commit/68b131d5b674549bb637b366730497714ad11328 | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:06 | admin | set | github: 66338 |
| 2020-11-27 14:00:05 | iritkatriel | link | issue31713 superseder |
| 2017-09-28 03:27:44 | benjamin.peterson | set | messages: +msg303188 |
| 2017-09-28 03:23:50 | benjamin.peterson | set | pull_requests: +pull_request3777 |
| 2017-09-27 05:45:08 | benjamin.peterson | set | status: open -> closed nosy: +benjamin.peterson messages: +msg303096 resolution: fixed stage: patch review -> resolved |
| 2017-09-26 15:16:52 | mgorny | set | messages: +msg303045 versions: + Python 3.5, Python 3.6, Python 3.7, Python 3.8 |
| 2017-09-26 15:13:21 | mgorny | set | keywords: +patch stage: needs patch -> patch review pull_requests: +pull_request3754 |
| 2017-09-25 17:44:22 | mgorny | set | nosy: +mgorny |
| 2015-08-23 09:41:05 | animus | set | nosy: +animus messages: +msg249003 |
| 2015-07-22 10:45:56 | rdossin | set | files: +patch_python_sym_links.txt nosy: +rdossin messages: +msg247108 |
| 2014-11-18 07:19:37 | serhiy.storchaka | set | nosy: +serhiy.storchaka messages: +msg231307 components: + Build, - Demos and Tools stage: needs patch |
| 2014-08-05 13:28:32 | Michael.Dussere | create | |