[Python-bugs-list] [ python-Bugs-442724 ] Setting PYTHONHOME= breaks setup.py

noreply@sourceforge.net noreply@sourceforge.net
Thu, 19 Jul 2001 07:49:53 -0700


Bugs item #442724, was opened at 2001-07-19 05:29
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=442724&group_id=5470

Category: Build
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Martin v. Löwis (loewis)
Assigned to: Thomas Wouters (twouters)
Summary: Setting PYTHONHOME= breaks setup.py

Initial Comment:
On UnixWare, the Makefile now invokes

PYTHONPATH= PYTHONHOME= PYTHONSTARTUP= ./python
setup.py build

This gives the error

'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "setup.py", line 6, in ?
    import sys, os, getopt
ImportError: No module named os

The problem is that it only looks in . and
lib/python2.2/*, not in Lib.

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

>Comment By: Thomas Wouters (twouters)
Date: 2001-07-19 07:49

Message:
Logged In: YES 
user_id=34209

No, it should not: unset does not *exist* on FreeBSD and
other BSDish platforms, so it can hardly be the right thing
:) I'm with Guido on this one, though: there should just be
a command-line option 'ignore all PYTHON* env vars' in Python.


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

Comment By: Neil Schemenauer (nascheme)
Date: 2001-07-19 07:27

Message:
Logged In: YES 
user_id=35752

I still think unsetting PYTHONHOME is the right thing to
do.  Setting PYTHONHOME to "" is a bad idea.  "PYTHONHOME="
and "unset PYTHONHOME" are not equivalent.  The line in
the makefile should be:

        unset PYTHONPATH PYTHONHOME PYTHONSTARTUP;                 ./$(PYTHON) $(srcdir)/setup.py build




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

Comment By: Thomas Wouters (twouters)
Date: 2001-07-19 06:15

Message:
Logged In: YES 
user_id=34209

Unsetting PYTHONHOME was not my idea :) But I do agree that
doing this in 2.1.1 is not a good idea. Reverting the patch
there, and reassigning the bug to Neil, whose idea it seems
to have been.


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

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