mirror of https://github.com/pypa/pip
Vendoring: Drop the bin directory
It contains the executables: easy_install, distro, chardetect etc. It should not be picked as vendored library. Related to https://github.com/pypa/pip/issues/5347
This commit is contained in:
parent
461d94698e
commit
04e98d9718
|
@ -17,8 +17,8 @@ FILE_WHITE_LIST = (
|
|||
)
|
||||
|
||||
|
||||
def drop_dir(path):
|
||||
shutil.rmtree(str(path))
|
||||
def drop_dir(path, **kwargs):
|
||||
shutil.rmtree(str(path), **kwargs)
|
||||
|
||||
|
||||
def remove_all(paths):
|
||||
|
@ -114,6 +114,10 @@ def vendor(ctx, vendor_dir):
|
|||
drop_dir(vendor_dir / 'pkg_resources' / '_vendor')
|
||||
drop_dir(vendor_dir / 'pkg_resources' / 'extern')
|
||||
|
||||
# Drop the bin directory (contains easy_install, distro, chardetect etc.)
|
||||
# Might not appear on all OSes, so ignoring errors
|
||||
drop_dir(vendor_dir / 'bin', ignore_errors=True)
|
||||
|
||||
# Drop interpreter and OS specific msgpack libs.
|
||||
# Pip will rely on the python-only fallback instead.
|
||||
remove_all(vendor_dir.glob('msgpack/*.so'))
|
||||
|
|
Loading…
Reference in New Issue