Skip to content

Commit b2fcaac

Browse files
authored
Merge pull request #7485 from pradyunsg/vendoring/switch-to-dedicated-tool
Switch to a dedicated tool for vendoring pip's dependencies
2 parents d6491fe + 6929cc6 commit b2fcaac

File tree

6 files changed

+43
-348
lines changed

6 files changed

+43
-348
lines changed

news/4785.process

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Switch to a dedicated CLI tool for vendoring dependencies.

pyproject.toml

+39
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,42 @@ type = [
1818
{ name = "Improved Documentation", directory = "doc", showcontent = true },
1919
{ name = "Trivial Changes", directory = "trivial", showcontent = false },
2020
]
21+
22+
[tool.vendoring]
23+
destination = "src/pip/_vendor/"
24+
requirements = "src/pip/_vendor/vendor.txt"
25+
namespace = "pip._vendor"
26+
27+
protected-files = ["__init__.py", "README.rst", "vendor.txt"]
28+
patches-dir = "tools/automation/vendoring/patches"
29+
30+
[tool.vendoring.transformations]
31+
substitute = [
32+
# pkg_resource's vendored packages are directly vendored in pip.
33+
{ match='pkg_resources\.extern', replace="pip._vendor" },
34+
{ match='from \.extern', replace="from pip._vendor" },
35+
]
36+
drop = [
37+
# contains unnecessary scripts
38+
"bin/",
39+
# interpreter and OS specific msgpack libs
40+
"msgpack/*.so",
41+
# unneeded parts of setuptools
42+
"easy_install.py",
43+
"setuptools",
44+
"pkg_resources/_vendor/",
45+
"pkg_resources/extern/",
46+
]
47+
48+
[tool.vendoring.typing-stubs]
49+
six = ["six.__init__", "six.moves.__init__", "six.moves.configparser"]
50+
appdirs = []
51+
contextlib2 = []
52+
53+
[tool.vendoring.license.directories]
54+
setuptools = "pkg_resources"
55+
msgpack-python = "msgpack"
56+
57+
[tool.vendoring.license.fallback-urls]
58+
pytoml = "https://github.com/avakar/pytoml/raw/master/LICENSE"
59+
webencodings = "https://github.com/SimonSapin/python-webencodings/raw/master/LICENSE"

tasks/__init__.py

-4
This file was deleted.

tools/automation/vendoring/__init__.py

-282
This file was deleted.

tools/automation/vendoring/typing.py

-59
This file was deleted.

0 commit comments

Comments
 (0)