New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"python-config --includes" returns a wrong path (double prefix) #66338
Comments
Our python is installed on a shared directory that is accessed through a symbolic link. $ ls -al /Produits
lrwxrwxrwx 1 root root 13 Oct 31 2013 /Produits -> /nfs/Produits With 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.4m The problem is due to a double string replacement in the script prefix_build="/Produits/publics/x86_64.Linux.RH6/python/3.4.1" # Use sed to fix paths from their built-to locations to their installed-to 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 following |
Do you want to provide a patch? |
I stumbled across the exact same problem and I have made a fix that is working, at least for the usage I have... |
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'. |
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. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: