[Python-checkins] python/dist/src/Lib site.py,1.51,1.52
jhylton@users.sourceforge.net
jhylton@users.sourceforge.net
Fri, 18 Jul 2003 10:24:09 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv18915
Modified Files:
site.py
Log Message:
SF patch 773476: NameError when there are no prefixes.
Index: site.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** site.py 3 Jun 2003 10:55:35 -0000 1.51
--- site.py 18 Jul 2003 17:24:07 -0000 1.52
***************
*** 92,100 ****
if (os.name == "posix" and sys.path and
os.path.basename(sys.path[-1]) == "Modules"):
! from distutils.util import get_platform
! s = "build/lib.%s-%.3s" % (get_platform(), sys.version)
s = os.path.join(os.path.dirname(sys.path[-1]), s)
sys.path.append(s)
! del get_platform, s
def _init_pathinfo():
--- 92,105 ----
if (os.name == "posix" and sys.path and
os.path.basename(sys.path[-1]) == "Modules"):
! s = "build/lib.%s-%.3s" % ("linux-i686", sys.version)
s = os.path.join(os.path.dirname(sys.path[-1]), s)
sys.path.append(s)
! ##if (os.name == "posix" and sys.path and
! ## os.path.basename(sys.path[-1]) == "Modules"):
! ## from distutils.util import get_platform
! ## s = "build/lib.%s-%.3s" % (get_platform(), sys.version)
! ## s = os.path.join(os.path.dirname(sys.path[-1]), s)
! ## sys.path.append(s)
! ## del get_platform, s
def _init_pathinfo():
***************
*** 159,162 ****
--- 164,168 ----
prefixes = [sys.prefix]
+ sitedir = None # make sure sitedir is initialized because of later 'del'
if sys.exec_prefix != sys.prefix:
prefixes.append(sys.exec_prefix)