Skip to content

Commit 1f695ee

Browse files
fahhemDouglas Greiman
authored andcommitted
Make paths absolute before comparing (google#73)
Sometimes the archive path is relative while sys.path[0] is absolute, or vice versa. This allows `setup()` to work in both cases
1 parent 17aee90 commit 1f695ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def setup(import_roots, zip_safe):
300300
warnings.warn('Failed to initialize .par file runtime support',
301301
UserWarning)
302302
return False
303-
if sys.path[0] != archive_path:
303+
if os.path.abspath(sys.path[0]) != os.path.abspath(archive_path):
304304
warnings.warn('Failed to initialize .par file runtime support. ' +
305305
'archive_path was %r, sys.path was %r' % (
306306
archive_path, sys.path),

0 commit comments

Comments
 (0)