Ned Deily added the comment:

The problem you see is being caused by trying to override "prefix" on the 
"altinstall" or "install" targets.  While Makefiles for many products will let 
you do that successfully, you really can't do that with Python's.  
Unfortunately, the values for "prefix" and "exec_prefix" specified (or 
defaulted) on ./configure are used during the main make build targets.  This 
includes the customization of the shebangs lines for the scripts like "idle" 
and "pydoc".  If you change the "prefix" value for the "install" phase, most 
files do get installed at the changed location but there are various places 
where the original, configured values remain.  You can see this if you run 
"python -m sysconfig" and examine the prefix values.  One result is that any 
scripts installed via Distutils (including using pip) will get installed to the 
configured location, e.g. default /usr/local/bin.  This also affects ensurepip 
(new in 3.4): the pip and easy_install scripts are installed in the configured 
value of p
 refix, e.g. /usr/local/bin, rather than the overridden value.  That's not good.

Changing prefix on the install targets seems like a fairly esoteric use case 
and one with an easy workaround: don't do that, use ./configure 
--prefix=/path/to instead.  I don't think it's worth trying to support since it 
may require some major Makefile work to get all the right dependencies.  But, 
at a minimum, it would be worth adding a test to the various install targets 
that would check and abort if prefix is attempted to be changed so you don't 
end up with a silently broken installation.

----------
components: +Build
keywords: +easy
nosy: +ned.deily
stage:  -> needs patch
title: idle, pydoc search python on wrong path at make altinstall with 
different exec- and prefix e.g. $HOME -> python installation is broken if 
prefix is overridden on an install target

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18320>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to