Skip to content

Commit 81af21c

Browse files
committed
Make pip's licensing metadata more comprehensive
* Include all license files for the vendored dependencies inside the wheel, and in the `License-File` package metadata field. * Replace the deprecated `License` metadata field with `License-Expression`, set to an intersection of all vendored dependency licenses, as well as pip's own license. Remove the deprecated `License :: OSI Approved :: MIT License` classifier. License files are included in distributions automatically, so remove them from `MANIFEST.in`.
1 parent 84b09d0 commit 81af21c

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

MANIFEST.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
include AUTHORS.txt
2-
include LICENSE.txt
31
include NEWS.rst
42
include README.rst
53
include SECURITY.md
@@ -12,8 +10,6 @@ include build-project/.python-version
1210

1311
include src/pip/_vendor/README.rst
1412
include src/pip/_vendor/vendor.txt
15-
recursive-include src/pip/_vendor *LICENSE*
16-
recursive-include src/pip/_vendor *COPYING*
1713

1814
include docs/requirements.txt
1915

news/13335.feature.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pip's own licensing metadata now follows PEP 639 and includes information on
2+
vendored dependencies.

pyproject.toml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,25 @@ dynamic = ["version"]
44
name = "pip"
55
description = "The PyPA recommended tool for installing Python packages."
66
readme = "README.rst"
7-
license = {text = "MIT"}
7+
8+
# Apache-2.0 OR BSD-2-Clause: packaging
9+
# Apache-2.0: cachecontrol, distro, msgpack, requests
10+
# BSD-2-Clause: pygments
11+
# BSD-3-Clause: idna
12+
# ISC: resolvelib
13+
# MIT: dependency-groups, pip, platformdirs, pyproject-hooks, rich, setuptools,
14+
# urllib3, tomli, truststore
15+
# MPL-2.0: certifi
16+
# PSF-2.0: distlib, typing-extensions
17+
license = "Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND PSF-2.0"
18+
19+
license-files = [
20+
"AUTHORS.txt", "LICENSE.txt",
21+
"src/pip/_vendor/**/*LICENSE*", "src/pip/_vendor/**/*COPYING*",
22+
]
823
classifiers = [
924
"Development Status :: 5 - Production/Stable",
1025
"Intended Audience :: Developers",
11-
"License :: OSI Approved :: MIT License",
1226
"Topic :: Software Development :: Build Tools",
1327
"Programming Language :: Python",
1428
"Programming Language :: Python :: 3",
@@ -40,8 +54,7 @@ Source = "https://github.com/pypa/pip"
4054
Changelog = "https://pip.pypa.io/en/stable/news/"
4155

4256
[build-system]
43-
# The lower bound is for <https://github.com/pypa/setuptools/issues/3865>.
44-
requires = ["setuptools>=67.6.1"]
57+
requires = ["setuptools>=77"]
4558
build-backend = "setuptools.build_meta"
4659

4760
[tool.setuptools]

src/pip/_vendor/README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Vendoring Policy
99
* Vendored libraries **MUST** be available under a license that allows
1010
them to be integrated into ``pip``, which is released under the MIT license.
1111
* Vendored libraries **MUST** be accompanied with LICENSE files.
12+
* The licenses of vendored libraries **MUST** be added to the value of
13+
the `license` key in `pyproject.toml`.
1214
* The versions of libraries vendored in pip **MUST** be reflected in
1315
``pip/_vendor/vendor.txt``.
1416
* Vendored libraries **MUST** function without any build steps such as ``2to3``

0 commit comments

Comments
 (0)