1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Don't use install_req.source_dir directly

Why: This enables a simplification in a follow up and AFAICT, they'll be
the same here.
This commit is contained in:
Pradyun Gedam 2019-09-30 15:53:31 +05:30
parent 628dfd9fab
commit 5307ed0c10
No known key found for this signature in database
GPG key ID: DA17C4B29CB32E4B

View file

@ -68,12 +68,11 @@ def find_egg_info(install_req):
(os.path.altsep and dir_.count(os.path.altsep) or 0)
)
base = install_req.unpacked_source_directory
if install_req.editable:
base = install_req.source_dir
filenames = locate_editable_egg_info(base)
else:
dir_ = install_req.unpacked_source_directory
base = os.path.join(dir_, 'pip-egg-info')
base = os.path.join(base, 'pip-egg-info')
filenames = os.listdir(base)
if not filenames: