[Python-bugs-list] [ python-Bugs-455537 ] module search in import.c
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 27 Aug 2001 15:20:07 -0700
Bugs item #455537, was opened at 2001-08-26 10:07
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=455537&group_id=5470
Category: Build
Group: Python 2.1.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Armin Steinhoff (arminsteinhoff)
Assigned to: Nobody/Anonymous (nobody)
Summary: module search in import.c
Initial Comment:
I'm porting 2.1.1 to QNX6 and got the situation that the module 'os' could not
be be found with 'import os'
After some hacking with DDD .. I found out that the pathes used by the search
algorithm of import.c has nothing to do with the directory structure of the UNIX
distribution of Python 2.1.1 =:-/
I have installed Python in the root directory and set PYTHONHOME/PYTHONPATH to
/Python-2.1.1 -> the path to he library modules is then
-> /Python-2.1.1/Lib OK ... that's not a clean place for UNIX freaks :)
The search algorithm of import.c is using the following search path sequence:
"os.so" -> I don't know why it should make sense to open
a shared object with fopen ??
"osmodule.so"
"os.py"
"os.pyc"
"/Python-2.1.1/os.so" ... os.pyc
"/Python-2.1.1/lib/python2.1/os.so" ... os.pyc
^^^^^^^^^^^^^^^ who got the idea that this is part of the
UNIX tar.gz distribution ??
Also ... there are similar problems with the binaries installed by 'make install' ...
Armin
a-steinhoff@web.de
----------------------------------------------------------------------
>Comment By: Jeremy Hylton (jhylton)
Date: 2001-08-27 15:20
Message:
Logged In: YES
user_id=31392
I'm not sure what the complaint is. The man page for Python
is quite clear about what PYTHONHOME means:
Change the location of the standard Python libraries. By
default, the
libraries are searched in ${prefix}/lib/python<version> and
${exec_prefix}/lib/python<version>, where ${prefix} and
${exec_prefix}
are installation-dependent directories, both defaulting to
\fI/usr/local\fP. When $PYTHONHOME is set to a single
directory, its value
replaces both ${prefix} and ${exec_prefix}. To specify
different values
for these, set $PYTHONHOME to ${prefix}:${exec_prefix}.
It sounds like Python is doing exactly what it is documented
to do.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=455537&group_id=5470