Skip to content

Commit 73c1394

Browse files
committed
Use flit to build pip distributions
1 parent da3aca3 commit 73c1394

File tree

6 files changed

+56
-77
lines changed

6 files changed

+56
-77
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
- run: pip install nox
8383
- run: nox -s prepare-release -- 99.9
8484
- run: nox -s build-release -- 99.9
85-
- run: pipx run check-manifest
85+
- run: pipx run check-sdist
8686

8787
vendoring:
8888
name: vendoring

MANIFEST.in

Lines changed: 0 additions & 38 deletions
This file was deleted.

build-project/build-requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
build
2-
setuptools
2+
flit-core

build-project/build-requirements.txt

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,15 @@ build==1.2.2.post1 \
88
--hash=sha256:1d61c0887fa860c01971625baae8bdd338e517b836a2f70dd1f7aa3a6b2fc5b5 \
99
--hash=sha256:b36993e92ca9375a219c99e606a122ff365a760a2d4bba0caa09bd5278b608b7
1010
# via -r build-requirements.in
11-
packaging==24.2 \
12-
--hash=sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759 \
13-
--hash=sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f
11+
flit-core==3.12.0 \
12+
--hash=sha256:18f63100d6f94385c6ed57a72073443e1a71a4acb4339491615d0f16d6ff01b2 \
13+
--hash=sha256:e7a0304069ea895172e3c7bb703292e992c5d1555dd1233ab7b5621b5b69e62c
14+
# via -r build-requirements.in
15+
packaging==25.0 \
16+
--hash=sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484 \
17+
--hash=sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f
1418
# via build
1519
pyproject-hooks==1.2.0 \
1620
--hash=sha256:1e859bd5c40fae9448642dd871adf459e5e2084186e8d2c2a79a824c970da1f8 \
1721
--hash=sha256:9e5c6bfa8dcc30091c74b0cf803c81fdd29d94f01992a7707bc97babb1141913
1822
# via build
19-
20-
# The following packages are considered to be unsafe in a requirements file:
21-
setuptools==80.9.0 \
22-
--hash=sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 \
23-
--hash=sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c
24-
# via -r build-requirements.in

docs/html/development/architecture/anatomy.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ The ``README``, license, ``pyproject.toml``, and so on are in the top level.
1818

1919
* ``AUTHORS.txt``
2020
* ``LICENSE.txt``
21-
* ``MANIFEST.in``
2221
* ``NEWS.rst``
2322
* ``pyproject.toml``
2423
* ``README.rst``

pyproject.toml

Lines changed: 47 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[project]
22
dynamic = ["version"]
3-
43
name = "pip"
54
description = "The PyPA recommended tool for installing Python packages."
65
readme = "README.rst"
@@ -40,32 +39,53 @@ Source = "https://github.com/pypa/pip"
4039
Changelog = "https://pip.pypa.io/en/stable/news/"
4140

4241
[build-system]
43-
# The lower bound is for <https://github.com/pypa/setuptools/issues/3865>.
44-
requires = ["setuptools>=67.6.1"]
45-
build-backend = "setuptools.build_meta"
46-
47-
[tool.setuptools]
48-
package-dir = {"" = "src"}
49-
include-package-data = false
50-
51-
[tool.setuptools.dynamic]
52-
version = {attr = "pip.__version__"}
53-
54-
[tool.setuptools.packages.find]
55-
where = ["src"]
56-
exclude = ["contrib", "docs", "tests*", "tasks"]
57-
58-
[tool.setuptools.package-data]
59-
"pip" = ["py.typed"]
60-
"pip._vendor" = ["vendor.txt"]
61-
"pip._vendor.certifi" = ["*.pem"]
62-
"pip._vendor.distlib" = [
63-
"t32.exe",
64-
"t64.exe",
65-
"t64-arm.exe",
66-
"w32.exe",
67-
"w64.exe",
68-
"w64-arm.exe",
42+
requires = ["flit-core >=3.8,<4"]
43+
build-backend = "flit_core.buildapi"
44+
45+
[tool.flit.module]
46+
name = "pip"
47+
path = "src/pip"
48+
49+
[tool.flit.sdist]
50+
include = [
51+
"AUTHORS.txt",
52+
"LICENSE.txt",
53+
"NEWS.rst",
54+
"README.rst",
55+
"SECURITY.md",
56+
"pyproject.toml",
57+
"build-project/build-requirements.in",
58+
"build-project/build-requirements.txt",
59+
"build-project/build-project.py",
60+
"build-project/.python-version",
61+
"src/pip/_vendor/README.rst",
62+
"src/pip/_vendor/vendor.txt",
63+
"src/pip/_vendor/**/*LICENSE*",
64+
"src/pip/_vendor/**/*COPYING*",
65+
"docs/requirements.txt",
66+
"src/pip/_vendor/**/*.pem",
67+
"src/pip/_vendor/**/py.typed",
68+
"docs/**/*.css",
69+
"docs/**/*.py",
70+
"docs/**/*.rst",
71+
"docs/**/*.md",
72+
"docs/**/*.dot",
73+
"docs/**/*.png",
74+
]
75+
76+
exclude = [
77+
".git-blame-ignore-revs",
78+
".mailmap",
79+
".readthedocs.yml",
80+
".pre-commit-config.yaml",
81+
".readthedocs-custom-redirects.yml",
82+
"noxfile.py",
83+
"*.pyi",
84+
".github/**",
85+
"docs/build/**",
86+
"news/**",
87+
"tests/**",
88+
"tools/**",
6989
]
7090

7191
######################################################################################

0 commit comments

Comments
 (0)