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

SourceForge.net noreply at sourceforge.net
Thu Sep 22 09:19:19 CEST 2005


Bugs item #959576, was opened at 2004-05-24 19:16
Message generated for change (Comment added) made by birkenfeld
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=959576&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.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).

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

>Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-09-22 09:19

Message:
Logged In: YES 
user_id=1188172

Seems that the pwdmodule entry in Modules/Setup.dist must be
uncommented.

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

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