Skip to content

Switch to a dedicated tool for vendoring pip's dependencies #7485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/4785.process
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Switch to a dedicated CLI tool for vendoring dependencies.
39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,42 @@ type = [
{ name = "Improved Documentation", directory = "doc", showcontent = true },
{ name = "Trivial Changes", directory = "trivial", showcontent = false },
]

[tool.vendoring]
destination = "src/pip/_vendor/"
requirements = "src/pip/_vendor/vendor.txt"
namespace = "pip._vendor"

protected-files = ["__init__.py", "README.rst", "vendor.txt"]
patches-dir = "tools/automation/vendoring/patches"

[tool.vendoring.transformations]
substitute = [
# pkg_resource's vendored packages are directly vendored in pip.
{ match='pkg_resources\.extern', replace="pip._vendor" },
{ match='from \.extern', replace="from pip._vendor" },
]
drop = [
# contains unnecessary scripts
"bin/",
# interpreter and OS specific msgpack libs
"msgpack/*.so",
# unneeded parts of setuptools
"easy_install.py",
"setuptools",
"pkg_resources/_vendor/",
"pkg_resources/extern/",
]

[tool.vendoring.typing-stubs]
six = ["six.__init__", "six.moves.__init__", "six.moves.configparser"]
appdirs = []
contextlib2 = []

[tool.vendoring.license.directories]
setuptools = "pkg_resources"
msgpack-python = "msgpack"

[tool.vendoring.license.fallback-urls]
pytoml = "https://github.com/avakar/pytoml/raw/master/LICENSE"
webencodings = "https://github.com/SimonSapin/python-webencodings/raw/master/LICENSE"
4 changes: 0 additions & 4 deletions tasks/__init__.py

This file was deleted.

282 changes: 0 additions & 282 deletions tools/automation/vendoring/__init__.py

This file was deleted.

59 changes: 0 additions & 59 deletions tools/automation/vendoring/typing.py

This file was deleted.

Loading