Skip to content

Commit

Permalink
Make BuildEnvironment._temp_dir a local variable
Browse files Browse the repository at this point in the history
  • Loading branch information
chrahunt committed Feb 5, 2020
1 parent d99462a commit e800cb1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pip/_internal/build_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
))

Expand All @@ -78,7 +78,7 @@ def __init__(self):
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:
Expand Down

0 comments on commit e800cb1

Please sign in to comment.