Skip to content

Commit 1b8a693

Browse files
committed
Vendor setuptools_scm instead of declaring it to avoid bootstrapping issue.
1 parent 32e4074 commit 1b8a693

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3504
-1
lines changed

conftest.py

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def pytest_configure(config):
3333
'setuptools/_distutils',
3434
'_distutils_hack',
3535
'pkg_resources/tests/data',
36+
'setuptools/_build_vendor',
3637
'setuptools/_vendor',
3738
'setuptools/config/_validate_pyproject',
3839
'setuptools/modified.py',

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools_scm[toml]>=3.4.1"]
2+
requires = []
33
build-backend = "setuptools.build_meta"
44
backend-path = ["."]
55

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
here = os.path.dirname(__file__)
1111

12+
sys.path.extend(((vendor_path := os.path.join(os.path.dirname(__file__), 'setuptools', '_build_vendor')) not in sys.path) * [vendor_path]) # fmt: skip
1213

1314
package_data = dict(
1415
setuptools=['script (dev).tmpl', 'script.tmpl', 'site-patch.py'],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pip
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Permission is hereby granted, free of charge, to any person obtaining a copy
2+
of this software and associated documentation files (the "Software"), to deal
3+
in the Software without restriction, including without limitation the rights
4+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5+
copies of the Software, and to permit persons to whom the Software is
6+
furnished to do so, subject to the following conditions:
7+
8+
The above copyright notice and this permission notice shall be included in
9+
all copies or substantial portions of the Software.
10+
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
17+
THE SOFTWARE.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
Metadata-Version: 2.1
2+
Name: setuptools-scm
3+
Version: 8.1.0
4+
Summary: the blessed package to manage your versions by scm tags
5+
Author-email: Ronny Pfannschmidt <[email protected]>
6+
License: Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.
23+
24+
Project-URL: documentation, https://setuptools-scm.readthedocs.io/
25+
Project-URL: repository, https://github.com/pypa/setuptools_scm/
26+
Classifier: Development Status :: 5 - Production/Stable
27+
Classifier: Intended Audience :: Developers
28+
Classifier: License :: OSI Approved :: MIT License
29+
Classifier: Programming Language :: Python
30+
Classifier: Programming Language :: Python :: 3 :: Only
31+
Classifier: Programming Language :: Python :: 3.8
32+
Classifier: Programming Language :: Python :: 3.9
33+
Classifier: Programming Language :: Python :: 3.10
34+
Classifier: Programming Language :: Python :: 3.11
35+
Classifier: Programming Language :: Python :: 3.12
36+
Classifier: Topic :: Software Development :: Libraries
37+
Classifier: Topic :: Software Development :: Version Control
38+
Classifier: Topic :: System :: Software Distribution
39+
Classifier: Topic :: Utilities
40+
Requires-Python: >=3.8
41+
Description-Content-Type: text/markdown
42+
License-File: LICENSE
43+
Requires-Dist: packaging >=20
44+
Requires-Dist: setuptools
45+
Requires-Dist: typing-extensions ; python_version < "3.10"
46+
Requires-Dist: tomli >=1 ; python_version < "3.11"
47+
Provides-Extra: docs
48+
Requires-Dist: entangled-cli ~=2.0 ; extra == 'docs'
49+
Requires-Dist: mkdocs ; extra == 'docs'
50+
Requires-Dist: mkdocs-entangled-plugin ; extra == 'docs'
51+
Requires-Dist: mkdocs-material ; extra == 'docs'
52+
Requires-Dist: mkdocstrings[python] ; extra == 'docs'
53+
Requires-Dist: pygments ; extra == 'docs'
54+
Provides-Extra: rich
55+
Requires-Dist: rich ; extra == 'rich'
56+
Provides-Extra: test
57+
Requires-Dist: build ; extra == 'test'
58+
Requires-Dist: pytest ; extra == 'test'
59+
Requires-Dist: rich ; extra == 'test'
60+
Requires-Dist: wheel ; extra == 'test'
61+
Requires-Dist: typing-extensions ; (python_version < "3.11") and extra == 'test'
62+
Provides-Extra: toml
63+
64+
# setuptools_scm
65+
[![github ci](https://github.com/pypa/setuptools_scm/workflows/python%20tests+artifacts+release/badge.svg)](https://github.com/pypa/setuptools_scm/actions)
66+
[![Documentation Status](https://readthedocs.org/projects/setuptools-scm/badge/?version=latest)](https://setuptools-scm.readthedocs.io/en/latest/?badge=latest)
67+
[![tidelift](https://tidelift.com/badges/package/pypi/setuptools-scm) ](https://tidelift.com/subscription/pkg/pypi-setuptools-scm?utm_source=pypi-setuptools-scm&utm_medium=readme)
68+
69+
## about
70+
71+
[setuptools-scm] extracts Python package versions from `git` or
72+
`hg` metadata instead of declaring them as the version argument
73+
or in an SCM managed file.
74+
75+
Additionally, [setuptools-scm] provides setuptools
76+
with a list of files that are managed by the SCM <br/>
77+
(i.e. it automatically adds **all of** the SCM-managed files to the sdist).<br/>
78+
Unwanted files must be excluded via `MANIFEST.in`.
79+
80+
81+
## `pyproject.toml` usage
82+
83+
The preferred way to configure [setuptools-scm] is to author
84+
settings in a `tool.setuptools_scm` section of `pyproject.toml`.
85+
86+
This feature requires setuptools 61 or later.
87+
First, ensure that [setuptools-scm] is present during the project's
88+
build step by specifying it as one of the build requirements.
89+
90+
```toml title="pyproject.toml"
91+
[build-system]
92+
requires = ["setuptools>=64", "setuptools_scm>=8"]
93+
build-backend = "setuptools.build_meta"
94+
```
95+
96+
That will be sufficient to require [setuptools-scm] for projects
97+
that support [PEP 518] like [pip] and [build].
98+
99+
[pip]: https://pypi.org/project/pip
100+
[build]: https://pypi.org/project/build
101+
[PEP 518]: https://peps.python.org/pep-0518/
102+
103+
104+
To enable version inference, you need to set the version
105+
dynamically in the `project` section of `pyproject.toml`:
106+
107+
```toml title="pyproject.toml"
108+
[project]
109+
# version = "0.0.1" # Remove any existing version parameter.
110+
dynamic = ["version"]
111+
112+
[tool.setuptools_scm]
113+
```
114+
115+
Additionally, a version file can be written by specifying:
116+
117+
```toml title="pyproject.toml"
118+
[tool.setuptools_scm]
119+
version_file = "pkg/_version.py"
120+
```
121+
122+
Where `pkg` is the name of your package.
123+
124+
If you need to confirm which version string is being generated or debug the configuration,
125+
you can install [setuptools-scm] directly in your working environment and run:
126+
127+
```console
128+
$ python -m setuptools_scm
129+
# To explore other options, try:
130+
$ python -m setuptools_scm --help
131+
```
132+
133+
For further configuration see the [documentation].
134+
135+
[setuptools-scm]: https://github.com/pypa/setuptools_scm
136+
[documentation]: https://setuptools-scm.readthedocs.io/
137+
138+
139+
## Interaction with Enterprise Distributions
140+
141+
Some enterprise distributions like RHEL7
142+
ship rather old setuptools versions.
143+
144+
In those cases its typically possible to build by using an sdist against `setuptools_scm<2.0`.
145+
As those old setuptools versions lack sensible types for versions,
146+
modern [setuptools-scm] is unable to support them sensibly.
147+
148+
It's strongly recommended to build a wheel artifact using modern Python and setuptools,
149+
then installing the artifact instead of trying to run against old setuptools versions.
150+
151+
152+
## Code of Conduct
153+
154+
155+
Everyone interacting in the [setuptools-scm] project's codebases, issue
156+
trackers, chat rooms, and mailing lists is expected to follow the
157+
[PSF Code of Conduct].
158+
159+
[PSF Code of Conduct]: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md
160+
161+
162+
## Security Contact
163+
164+
To report a security vulnerability, please use the
165+
[Tidelift security contact](https://tidelift.com/security).
166+
Tidelift will coordinate the fix and disclosure.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
setuptools_scm-8.1.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2+
setuptools_scm-8.1.0.dist-info/LICENSE,sha256=iYB6zyMJvShfAzQE7nhYFgLzzZuBmhasLw5fYP9KRz4,1023
3+
setuptools_scm-8.1.0.dist-info/METADATA,sha256=JstkuN1RJAjyijO1FYrd2ZfrphMgbl-j1LyiGmVbzrQ,6614
4+
setuptools_scm-8.1.0.dist-info/RECORD,,
5+
setuptools_scm-8.1.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6+
setuptools_scm-8.1.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
7+
setuptools_scm-8.1.0.dist-info/entry_points.txt,sha256=7VjBrJmw12qwaWG0yLbRs5fYIf7g4ySdOwHNsJMhy4A,1776
8+
setuptools_scm-8.1.0.dist-info/top_level.txt,sha256=kiu-91q3_rJLUoc2wl8_lC4cIlpgtgdD_4NaChF4hOA,15
9+
setuptools_scm/.git_archival.txt,sha256=2_90kdS1POSQMuZfBCUw6qNjObu7Ijp8DmptEAmlGkU,102
10+
setuptools_scm/__init__.py,sha256=k4jjJK8ejFI95amIoLWNCFECWIQW9NlxF9Had4RqOHM,785
11+
setuptools_scm/__main__.py,sha256=AhntzdNH3Jhcio_Ohoc6_EW7CuIN02OM-0irpGEXXh0,116
12+
setuptools_scm/__pycache__/__init__.cpython-312.pyc,,
13+
setuptools_scm/__pycache__/__main__.cpython-312.pyc,,
14+
setuptools_scm/__pycache__/_cli.cpython-312.pyc,,
15+
setuptools_scm/__pycache__/_config.cpython-312.pyc,,
16+
setuptools_scm/__pycache__/_entrypoints.cpython-312.pyc,,
17+
setuptools_scm/__pycache__/_get_version_impl.cpython-312.pyc,,
18+
setuptools_scm/__pycache__/_log.cpython-312.pyc,,
19+
setuptools_scm/__pycache__/_modify_version.cpython-312.pyc,,
20+
setuptools_scm/__pycache__/_overrides.cpython-312.pyc,,
21+
setuptools_scm/__pycache__/_run_cmd.cpython-312.pyc,,
22+
setuptools_scm/__pycache__/_types.cpython-312.pyc,,
23+
setuptools_scm/__pycache__/_version_cls.cpython-312.pyc,,
24+
setuptools_scm/__pycache__/discover.cpython-312.pyc,,
25+
setuptools_scm/__pycache__/fallbacks.cpython-312.pyc,,
26+
setuptools_scm/__pycache__/git.cpython-312.pyc,,
27+
setuptools_scm/__pycache__/hg.cpython-312.pyc,,
28+
setuptools_scm/__pycache__/hg_git.cpython-312.pyc,,
29+
setuptools_scm/__pycache__/integration.cpython-312.pyc,,
30+
setuptools_scm/__pycache__/scm_workdir.cpython-312.pyc,,
31+
setuptools_scm/__pycache__/version.cpython-312.pyc,,
32+
setuptools_scm/_cli.py,sha256=c1OtDXCGl7IzCdZ8z8yJg9TEBt1eXjh3mgqr16Qc5dQ,5597
33+
setuptools_scm/_config.py,sha256=Zf9jOxr7BWQ8RN863MPOfzO6x8Os_pwYi7VuA0Bbr4U,4968
34+
setuptools_scm/_entrypoints.py,sha256=GX3Lqs4YFUbQMa0mKCVYpXsfP8kR8nIuYbXRYkPaz7Y,3843
35+
setuptools_scm/_file_finders/__init__.py,sha256=QBZkrT7FLNfclH7taOohnNAPkVtaLJva3cHpX0sozbc,3751
36+
setuptools_scm/_file_finders/__pycache__/__init__.cpython-312.pyc,,
37+
setuptools_scm/_file_finders/__pycache__/git.cpython-312.pyc,,
38+
setuptools_scm/_file_finders/__pycache__/hg.cpython-312.pyc,,
39+
setuptools_scm/_file_finders/__pycache__/pathtools.cpython-312.pyc,,
40+
setuptools_scm/_file_finders/git.py,sha256=vW_SGVGTXNFyC4dHOhNjh3ER2Aqp0QNe1qc0XLUIZEQ,4156
41+
setuptools_scm/_file_finders/hg.py,sha256=1I4LPr_k7lIVMTqSl9_h1_csIEYMfRow2ta5FEo0Rjs,2246
42+
setuptools_scm/_file_finders/pathtools.py,sha256=AgOl5u_WHxCQeiUCwlN8bUE3B4vs5BxSJEK1LJutyus,179
43+
setuptools_scm/_get_version_impl.py,sha256=P72m2imnte-J7IXD3nTjYk7gBUoLk6hrZZv5O5r9akY,5940
44+
setuptools_scm/_integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45+
setuptools_scm/_integration/__pycache__/__init__.cpython-312.pyc,,
46+
setuptools_scm/_integration/__pycache__/dump_version.cpython-312.pyc,,
47+
setuptools_scm/_integration/__pycache__/pyproject_reading.cpython-312.pyc,,
48+
setuptools_scm/_integration/__pycache__/setuptools.cpython-312.pyc,,
49+
setuptools_scm/_integration/__pycache__/toml.cpython-312.pyc,,
50+
setuptools_scm/_integration/dump_version.py,sha256=2VYFa0Aa1YRcrQQVit-COg7w1QaRjmZFM22LYZWuvEg,2584
51+
setuptools_scm/_integration/pyproject_reading.py,sha256=Wz-_ncjggrC-YfCsclIsSd2BkH0OYLdQhl9Insobpcg,2604
52+
setuptools_scm/_integration/setuptools.py,sha256=DcYqpUUMMu_gD2XxdyY3enPFr12pqV9fZa06PuFqBSU,3468
53+
setuptools_scm/_integration/toml.py,sha256=GYXDZOUC-AfQ_WmOIESP1ARBnc6WKIBQy3oDvsF-bUQ,1467
54+
setuptools_scm/_log.py,sha256=BFsXD-s2fcLV3zZaSQkQfRKPS-MjcI0tsmthJ3a2HqA,2137
55+
setuptools_scm/_modify_version.py,sha256=9VU-juFg2IZjrcyz9kLGRfBq4RyZZElhjPMipqjB3Xc,1738
56+
setuptools_scm/_overrides.py,sha256=2-ld0PSoi8IPVUAS3H2aBWM7yxJneDcyydq9ueQRdsE,1655
57+
setuptools_scm/_run_cmd.py,sha256=6AB6Kv1kg75Yx6-p7NHMrXSWTCPWDAN5id8cSF8XW6s,6094
58+
setuptools_scm/_types.py,sha256=QhY9jqXTH8sSxHXNQg2toQduk60s0vXya_Mdfv5rQAg,708
59+
setuptools_scm/_version_cls.py,sha256=9wEWl4WY_sUvqZhN1PQbVETVq9OAQKu1Y47ZPg9vx-c,2925
60+
setuptools_scm/discover.py,sha256=Kfm8S5I078vw8Cvbs9qpKOg5dr2TqBp1us-W579Dlts,2027
61+
setuptools_scm/fallbacks.py,sha256=x3Xv1p89AqJiBX6oxuoo8Di0yR5ijOFOwKBJGAeWTbY,1448
62+
setuptools_scm/git.py,sha256=-FbDzrVeEYd6jgEEzpWfuaeIfksS2QPktHZINXeSyzA,10526
63+
setuptools_scm/hg.py,sha256=iY294X0ZOqLEv_KXmPWwXXsPDhgx4wsOVoxFkM9WiPc,6207
64+
setuptools_scm/hg_git.py,sha256=hx2rq1kwW9Zs23xK9ZCn509emze22iyXvT3zIZh7JFM,4546
65+
setuptools_scm/integration.py,sha256=0l04N6IhRKW32vD9DPvvJuiZ1HrVCYupmNYDcYXu8lQ,806
66+
setuptools_scm/scm_workdir.py,sha256=oreoRhJfvhhxVGIhDPWH8-dg9umsmZM0sV2oRIzGXc8,327
67+
setuptools_scm/version.py,sha256=TzdIjApX5t-aWBwGZoJLykpGWVVStRxH2Fui0RVVXvU,14215

setuptools/_build_vendor/setuptools_scm-8.1.0.dist-info/REQUESTED

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Wheel-Version: 1.0
2+
Generator: bdist_wheel (0.43.0)
3+
Root-Is-Purelib: true
4+
Tag: py3-none-any
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[distutils.setup_keywords]
2+
use_scm_version = setuptools_scm._integration.setuptools:version_keyword
3+
4+
[setuptools.file_finders]
5+
setuptools_scm = setuptools_scm._file_finders:find_files
6+
7+
[setuptools.finalize_distribution_options]
8+
setuptools_scm = setuptools_scm._integration.setuptools:infer_version
9+
10+
[setuptools_scm.files_command]
11+
.git = setuptools_scm._file_finders.git:git_find_files
12+
.hg = setuptools_scm._file_finders.hg:hg_find_files
13+
14+
[setuptools_scm.files_command_fallback]
15+
.git_archival.txt = setuptools_scm._file_finders.git:git_archive_find_files
16+
.hg_archival.txt = setuptools_scm._file_finders.hg:hg_archive_find_files
17+
18+
[setuptools_scm.local_scheme]
19+
dirty-tag = setuptools_scm.version:get_local_dirty_tag
20+
no-local-version = setuptools_scm.version:get_no_local_node
21+
node-and-date = setuptools_scm.version:get_local_node_and_date
22+
node-and-timestamp = setuptools_scm.version:get_local_node_and_timestamp
23+
24+
[setuptools_scm.parse_scm]
25+
.git = setuptools_scm.git:parse
26+
.hg = setuptools_scm.hg:parse
27+
28+
[setuptools_scm.parse_scm_fallback]
29+
.git_archival.txt = setuptools_scm.git:parse_archival
30+
.hg_archival.txt = setuptools_scm.hg:parse_archival
31+
PKG-INFO = setuptools_scm.fallbacks:parse_pkginfo
32+
pyproject.toml = setuptools_scm.fallbacks:fallback_version
33+
setup.py = setuptools_scm.fallbacks:fallback_version
34+
35+
[setuptools_scm.version_scheme]
36+
calver-by-date = setuptools_scm.version:calver_by_date
37+
guess-next-dev = setuptools_scm.version:guess_next_dev_version
38+
no-guess-dev = setuptools_scm.version:no_guess_dev_version
39+
only-version = setuptools_scm.version:only_version
40+
post-release = setuptools_scm.version:postrelease_version
41+
python-simplified-semver = setuptools_scm.version:simplified_semver_version
42+
release-branch-semver = setuptools_scm.version:release_branch_semver_version
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
setuptools_scm
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node: $Format:%H$
2+
node-date: $Format:%cI$
3+
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""
2+
:copyright: 2010-2023 by Ronny Pfannschmidt
3+
:license: MIT
4+
"""
5+
6+
from __future__ import annotations
7+
8+
from ._config import DEFAULT_LOCAL_SCHEME
9+
from ._config import DEFAULT_VERSION_SCHEME
10+
from ._config import Configuration
11+
from ._get_version_impl import _get_version
12+
from ._get_version_impl import get_version
13+
from ._integration.dump_version import dump_version # soft deprecated
14+
from ._version_cls import NonNormalizedVersion
15+
from ._version_cls import Version
16+
from .version import ScmVersion
17+
18+
# Public API
19+
__all__ = [
20+
"DEFAULT_LOCAL_SCHEME",
21+
"DEFAULT_VERSION_SCHEME",
22+
"Configuration",
23+
"NonNormalizedVersion",
24+
"ScmVersion",
25+
"Version",
26+
"_get_version",
27+
"dump_version",
28+
# soft deprecated imports, left for backward compatibility
29+
"get_version",
30+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from __future__ import annotations
2+
3+
from ._cli import main
4+
5+
if __name__ == "__main__":
6+
raise SystemExit(main())

0 commit comments

Comments
 (0)