diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2015-01-13 17:08:04 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2015-01-14 09:14:59 +0100 |
commit | d627665e38e02978bcb5ec14fbf469ff2e99469d (patch) | |
tree | 7a97b15c7f83fa9baef9e24ddbc2c18998549ce9 /__root__ | |
parent | 5f4541095a5a3c849070d64a98868b2ef596d1ed (diff) | |
download | clufter-d627665e38e02978bcb5ec14fbf469ff2e99469d.tar.gz clufter-d627665e38e02978bcb5ec14fbf469ff2e99469d.tar.xz clufter-d627665e38e02978bcb5ec14fbf469ff2e99469d.zip |
setup: do not allow other dirs to be looked for
...when figuring out the "own identity"
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to '__root__')
-rw-r--r-- | __root__/setup.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/__root__/setup.py b/__root__/setup.py index 4d89416..3fe9e25 100644 --- a/__root__/setup.py +++ b/__root__/setup.py @@ -21,7 +21,7 @@ from os.path import (join as path_join, realpath as path_real, isabs as path_isabs, isdir as path_isdir, isfile as path_isfile, splitext as path_splitext) from shutil import copy, copymode -from sys import modules as sys_modules, prefix as sys_prefix +from sys import modules as sys_modules, path as sys_path, prefix as sys_prefix from distutils.cmd import Command from distutils.errors import DistutilsSetupError @@ -461,7 +461,9 @@ while True: if not hasattr(backup_mod, '__path__'): # not the case for builtins continue backup_mod = sys_modules.pop(project) + backup_path, sys_path[:] = sys_path[:], [here] pkg = __import__(project, globals=pkg) + sys_path[:] = backup_path break except ImportError: if backup_mod: |