1 # -*- coding: iso-8859-1 -*-
3 # $Id: util.py,v 1.4 2003/04/21 18:46:11 mfx Exp $
8 # prepare sys.path in case we are still in the build directory
9 # see also: distutils/command/build.py (build_platlib)
12 def get_sys_path(p=None):
13 if p is None: p = sys.path
16 from distutils.util import get_platform
23 plat_specifier = "%s-%s" % (plat, sys.version[:3])
24 ##print plat, plat_specifier
26 for prefix in (p0, os.curdir, os.pardir,):
29 d = os.path.join(prefix, "build")
30 for subdir in ("lib", "lib." + plat_specifier, "lib." + plat):
31 dir = os.path.normpath(os.path.join(d, subdir))
32 if os.path.isdir(dir):