mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Move dest_info_dir construction closer to first use
Reducing the scope of variables makes it easier to refactor, since we can extract whole contiguous chunks of code later.
This commit is contained in:
parent
3930e4b063
commit
0433200135
1 changed files with 2 additions and 2 deletions
|
@ -452,8 +452,6 @@ def install_unpacked_wheel(
|
|||
True,
|
||||
)
|
||||
|
||||
dest_info_dir = os.path.join(lib_dir, info_dir)
|
||||
|
||||
# Get the defined entry points
|
||||
distribution = pkg_resources_distribution_for_wheel(
|
||||
wheel_zip, name, wheel_path
|
||||
|
@ -624,6 +622,8 @@ def install_unpacked_wheel(
|
|||
os.chmod(f.name, generated_file_mode)
|
||||
replace(f.name, path)
|
||||
|
||||
dest_info_dir = os.path.join(lib_dir, info_dir)
|
||||
|
||||
# Record pip as the installer
|
||||
installer_path = os.path.join(dest_info_dir, 'INSTALLER')
|
||||
with _generate_file(installer_path) as installer_file:
|
||||
|
|
Loading…
Reference in a new issue