mirror of https://github.com/pypa/pip
Move record_path closer to first use
This commit is contained in:
parent
d441f9518b
commit
d7b5a776b3
|
@ -647,9 +647,6 @@ def install_unpacked_wheel(
|
|||
record_text = distribution.get_metadata('RECORD')
|
||||
record_rows = list(csv.reader(record_text.splitlines()))
|
||||
|
||||
# Record details of all files installed
|
||||
record_path = os.path.join(dest_info_dir, 'RECORD')
|
||||
|
||||
rows = get_csv_rows_for_installed(
|
||||
record_rows,
|
||||
installed=installed,
|
||||
|
@ -657,6 +654,9 @@ def install_unpacked_wheel(
|
|||
generated=generated,
|
||||
lib_dir=lib_dir)
|
||||
|
||||
# Record details of all files installed
|
||||
record_path = os.path.join(dest_info_dir, 'RECORD')
|
||||
|
||||
with _generate_file(record_path, **csv_io_kwargs('w')) as record_file:
|
||||
# The type mypy infers for record_file is different for Python 3
|
||||
# (typing.IO[Any]) and Python 2 (typing.BinaryIO). We explicitly
|
||||
|
|
Loading…
Reference in New Issue