[ python-Bugs-1495488 ] make altinstall installs pydoc
SourceForge.net
noreply at sourceforge.net
Wed Aug 23 01:50:44 CEST 2006
Bugs item #1495488, was opened at 2006-05-26 12:19
Message generated for change (Comment added) made by charlesmerriam
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1495488&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Tim Heaney (theaney)
Assigned to: Nobody/Anonymous (nobody)
Summary: make altinstall installs pydoc
Initial Comment:
I did the "make altinstall" rather than the "make
install" as suggested on
http://www.python.org/download/releases/2.5/
This worked great, creating a
/usr/local/bin/python2.5
which doesn't clash with my /usr/bin/python. However,
it also created a
/usr/local/bin/pydoc
which did clash with my /usr/bin/pydoc. I just removed
it and all is well. Should altinstall not create pydoc?
It could create pydoc2.5 rather than pydoc, but then
the shebang line would have to be changed to python2.5.
What about smtpd.py, idle, and python-config, which
were also created by altinstall? They don't currently
conflict with anything I have for Python 2.4, but the
potential is there for the same problem.
----------------------------------------------------------------------
Comment By: CharlesMerriam (charlesmerriam)
Date: 2006-08-22 23:50
Message:
Logged In: YES
user_id=1581732
Ah, it's a bit worse than that. Your /usr/loca/bin/pydoc
would not have worked anyway. It's first line:
#!/usr/local/bin/python
would give an error because only /usr/local/bin/python2.5
exists.
----------------------------------------------------------------------
Comment By: Tim Heaney (theaney)
Date: 2006-06-22 00:14
Message:
Logged In: YES
user_id=827666
Sorry, I haven't had a chance to look at this again. I just
installed Python-2.5b1 and it's still the same way. Here's
what I did to fix things up after the make altinstall...
# cd /usr/local/bin
# for file in pydoc idle smtpd.py python-config; do
mv $file ${file}2.5
sed -i 's@/usr/local/bin/python@/usr/local/bin/python2.5@'
${file}2.5
done
Now, how to fix up the Makefile.pre and setup.py so this
isn't necessary...
----------------------------------------------------------------------
Comment By: Tim Heaney (theaney)
Date: 2006-06-06 11:19
Message:
Logged In: YES
user_id=827666
I'm not sure I know how. It looks like the downloaded files
have the following shebang lines
Tools/scripts/pydoc => #!/usr/bin/env python
Tools/scripts/idle => #! /usr/bin/env python
Lib/smtpd.py => #! /usr/bin/env python
Misc/python-config.in => #!@BINDIR@/python
whereas the installed files have
/usr/local/bin/pydoc => #!/usr/local/bin/python
/usr/local/bin/idle => #!/usr/local/bin/python
/usr/local/bin/smtpd.py => #!/usr/local/bin/python
/usr/local/bin/python-config => #!/usr/local/bin/python
so they're already getting rewritten somewhere. We want both
their names and their shebang lines to have the version
/usr/local/bin/pydoc2.5 => #!/usr/local/bin/python2.5
/usr/local/bin/idle2.5 => #!/usr/local/bin/python2.5
/usr/local/bin/smtpd.py2.5 => #!/usr/local/bin/python2.5
/usr/local/bin/python-config2.5 => #!/usr/local/bin/python2.5
It seems that python-config appears in the Makefile, so
adding something like
sed -e "s, at BINDIR@,$(BINDIR)," <
$(srcdir)/Misc/python-config.in >python-config$(VERSION)$(EXE)
$(INSTALL_SCRIPT) python-config
$(BINDIR)/python-config$(VERSION)$(EXE)
rm python-config
to Makefile.pre.in in an altlibainstall section or something
might be all we need for that.
The others are named in setup.py
# Scripts to install
scripts = ['Tools/scripts/pydoc',
'Tools/scripts/idle',
'Lib/smtpd.py']
but I haven't worked out where they get rewritten or
installed yet.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2006-06-04 20:02
Message:
Logged In: YES
user_id=21627
You are right: altinstall shouldn't overwrite these
conflicting files. For idle and pydoc, I would think that
altinstall should install version-specific copies - users
actually might want to run an idle or pydoc associated with
a specific version, likewise for python-config. I'm
uncertain why smtpd.py is installed at all.
Would you be willing to work on a patch? You are right that
the shebang line should get updated during the installation,
too.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1495488&group_id=5470
More information about the Python-bugs-list
mailing list