Make BuildEnvironment._temp_dir a local variable
@@ -54,12 +54,12 @@ class BuildEnvironment(object):
def __init__(self):
# type: () -> None
- self._temp_dir = TempDirectory(
+ temp_dir = TempDirectory(
kind=tempdir_kinds.BUILD_ENV, globally_managed=True
)
self._prefixes = OrderedDict((
- (name, _Prefix(os.path.join(self._temp_dir.path, name)))
+ (name, _Prefix(os.path.join(temp_dir.path, name)))
for name in ('normal', 'overlay')
))
@@ -78,7 +78,7 @@ class BuildEnvironment(object):
get_python_lib(plat_specific=True),
)
}
- self._site_dir = os.path.join(self._temp_dir.path, 'site')
+ self._site_dir = os.path.join(temp_dir.path, 'site')
if not os.path.exists(self._site_dir):
os.mkdir(self._site_dir)
with open(os.path.join(self._site_dir, 'sitecustomize.py'), 'w') as fp:
