The function check_environ in Lib/distutils/util.py
imports the 'pwd' module if the HOME environment
variable is not set and os.name is 'posix' (as it is on
at least Linux, Solaris, and Tru64 Unix). In the
context of building Python, this happens before the pwd
module has been built. The error is reproduced below.
I can work around this easily. However, since the error
message was somewhat oblique, it was confusing to
diagnose. Perhaps there's some way to improve the
diagnostic if the underlying problem cannot be fixed.
case $MAKEFLAGS in *-s*) CC='cc' LDSHARED='ld -shared
-expect_unresolved "*"' OPT='-DNDEBUG -O -Olimit 1500'
./python -E ./setup.py -q build;; *) CC='cc'
LDSHARED='ld -shared -expect_unresolved "*"'
OPT='-DNDEBUG -O -Olimit 1500' ./python -E ./setup.py
build;; esac
Traceback (most recent call last):
File "./setup.py", line 795, in ?
main()
File "./setup.py", line 790, in main
scripts = ['Tools/scripts/pydoc']
File
"/usr/var/tmp/sat/xmpy/system/support/build/Python-2.Lib/distutils/core.py",
line 110, in setup
dist.parse_config_files()
File
"/usr/var/tmp/sat/xmpy/system/support/build/Python-2.Lib/distutils/dist.py",
line 310, in parse_config_files
filenames = self.find_config_files()
File
"/usr/var/tmp/sat/xmpy/system/support/build/Python-2.Lib/distutils/dist.py",
line 272, in find_config_files
check_environ()
File
"/usr/var/tmp/sat/xmpy/system/support/build/Python-2.Lib/distutils/util.py",
line 150, in check_environ
import pwd
ImportError: No module named pwd
|