[Python-bugs-list] [ python-Bugs-480480 ] pydoc #!/build-directory/python

noreply@sourceforge.net noreply@sourceforge.net
Sun, 11 Nov 2001 07:02:49 -0800


Bugs item #480480, was opened at 2001-11-10 16:22
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=480480&group_id=5470

>Category: Distutils
Group: Python 2.2
Status: Open
Resolution: None
>Priority: 7
Submitted By: Brian Zhou (bzhou)
Assigned to: Nobody/Anonymous (nobody)
Summary: pydoc #!/build-directory/python

Initial Comment:
Starting from source for example 
http://www.python.org/ftp/python/2.2/rpms/python2.2-
2.2b1-2.src.rpm

"make install" copies and later packages a version of 
pydoc which has hard-coded #!/build-directory/python

This pydoc will be installed on redhat 7.x.

The unwanted dependency will also cause the binary RPM 
installation to fail on redhat 6.2.

"make install" should be fixed to use "#!/usr/bin/env 
python" or simply pick-up Tools/scripts/pydoc. A quick 
workaround for rpm is to change the  python-2.2.spec 
file:

162,163c162
<       sed 's|#!/usr/bin/env python|#!/usr/bin/env 
python'%{binsuffix}'|' \
<             pydoc.old >pydoc
---
>       sed 's|#!.*python$|#!/usr/bin/env python'%
{binsuffix}'|' pydoc.old >pydoc


----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2001-11-11 07:02

Message:
Logged In: YES 
user_id=21627

Putting in /usr/bin/env is certainly not the right solution.
distutils was specifically designed to adjust the path of
scripts, to make sure that the Python binary used at
run-time is indeed the one used at installation time.
Otherwise, the user may break pydoc by putting a different
Python installation in front of the path.

Instead, distutils should be fixed to assume that the Python
interpreter will be in BINDIR. Recategorizing as distutils
bug, and raising the priority.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=480480&group_id=5470