[ python-Bugs-959576 ] Can't build Python on POSIX w/o $HOME

SourceForge.net noreply at sourceforge.net
Mon May 24 13:16:58 EDT 2004


Bugs item #959576, was opened at 2004-05-24 13:16
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=959576&group_id=5470

Category: Build
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Barry A. Warsaw (bwarsaw)
Assigned to: Nobody/Anonymous (nobody)
Summary: Can't build Python on POSIX w/o $HOME

Initial Comment:
If you're building Python on os.name == 'posix' but
when there is no $HOME defined in your environment, you
cannot build Python.  This is because in the bowels of
distutils, you end up in check_environ(), which has
these lines:

    if os.name == 'posix' and not
os.environ.has_key('HOME'):
        import pwd
        os.environ['HOME'] = pwd.getpwuid(os.getuid())[5]

However, in a from-scratch build, the pwd module isn't
built by the time you get here.  I found this when
using SCons to build Python, since by default the
enclosing environment isn't passed to subprocesses.

I can work around this in my builds but Python's
setup.py should probably synthesize a $HOME if one
doesn't exist.  (Or maybe someone has a better idea for
a workaround).

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

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



More information about the Python-bugs-list mailing list