--- Python-2.5.1/Lib/site.py 2007-11-13 00:33:22.000000000 +0100 +++ Python-2.5.1/Lib/site.py.orig 2007-11-13 00:31:52.000000000 +0100 @@ -140,8 +140,8 @@ line = line.rstrip() dir, dircase = makepath(sitedir, line) if not dircase in known_paths and os.path.exists(dir): - known_paths.add(dir) - addsitedir(dir, known_paths) + sys.path.append(dir) + known_paths.add(dircase) finally: f.close() if reset: @@ -157,7 +157,7 @@ else: reset = 0 sitedir, sitedircase = makepath(sitedir) - if not sitedircase in sys.path: + if not sitedircase in known_paths: sys.path.append(sitedir) # Add path component try: names = os.listdir(sitedir) @@ -393,7 +393,7 @@ def main(): abs__file__() - paths_in_sys = set(['']) + paths_in_sys = removeduppaths() if (os.name == "posix" and sys.path and os.path.basename(sys.path[-1]) == "Modules"): addbuilddir()