Skip to content

Commit d665621

Browse files
Merge pull request #1068 from jaraco/debt/rename
Rename the project to setuptools-scm
2 parents 6eb52e6 + 5f7ba15 commit d665621

17 files changed

+58
-57
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
- fix #925: allow `write_to` to be an absolute path when it's a subdirectory of the root
1616
- fix #932: ensure type annotations in version file don't cause linter issues
17-
- fix #930: temporary restore `DEFAULT_VERSION_SCHEME` and `DEFAULT_LOCAL_SCHEME` on the `setuptools_scm` package
17+
- fix #930: temporary restore `DEFAULT_VERSION_SCHEME` and `DEFAULT_LOCAL_SCHEME` on the `setuptools-scm` package
1818

1919

2020

@@ -60,6 +60,7 @@
6060
- use normalized dist names for the `SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${DIST_NAME}` env var
6161
- drop support for python 3.7
6262
- introduce `version_file` as replacement for `write_to`
63+
- renameed the project from `setuptools_scm` to `setuptools-scm`
6364

6465
## features
6566

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# setuptools_scm
2-
[![github ci](https://github.com/pypa/setuptools_scm/actions/workflows/python-tests.yml/badge.svg)](https://github.com/pypa/setuptools_scm/actions/workflows/python-tests.yml)
1+
# setuptools-scm
2+
[![github ci](https://github.com/pypa/setuptools-scm/actions/workflows/python-tests.yml/badge.svg)](https://github.com/pypa/setuptools-scm/actions/workflows/python-tests.yml)
33
[![Documentation Status](https://readthedocs.org/projects/setuptools-scm/badge/?version=latest)](https://setuptools-scm.readthedocs.io/en/latest/?badge=latest)
44
[![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)
55

@@ -28,7 +28,7 @@ build step by specifying it as one of the build requirements.
2828

2929
```toml title="pyproject.toml"
3030
[build-system]
31-
requires = ["setuptools>=64", "setuptools_scm>=8"]
31+
requires = ["setuptools>=64", "setuptools-scm>=8"]
3232
build-backend = "setuptools.build_meta"
3333
```
3434

@@ -71,7 +71,7 @@ $ python -m setuptools_scm --help
7171

7272
For further configuration see the [documentation].
7373

74-
[setuptools-scm]: https://github.com/pypa/setuptools_scm
74+
[setuptools-scm]: https://github.com/pypa/setuptools-scm
7575
[documentation]: https://setuptools-scm.readthedocs.io/
7676
[git-archive-docs]: https://setuptools-scm.readthedocs.io/en/stable/usage/#builtin-mechanisms-for-obtaining-version-numbers
7777

@@ -81,7 +81,7 @@ For further configuration see the [documentation].
8181
Some enterprise distributions like RHEL7
8282
ship rather old setuptools versions.
8383

84-
In those cases its typically possible to build by using an sdist against `setuptools_scm<2.0`.
84+
In those cases its typically possible to build by using an sdist against `setuptools-scm<2.0`.
8585
As those old setuptools versions lack sensible types for versions,
8686
modern [setuptools-scm] is unable to support them sensibly.
8787

docs/config.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ Callables or other Python objects have to be passed in `setup.py` (via the `use_
6969
`fallback_version: str | None = None`
7070
: A version string that will be used if no other method for detecting the
7171
version worked (e.g., when using a tarball with no metadata). If this is
72-
unset (the default), `setuptools_scm` will error if it fails to detect the
72+
unset (the default), `setuptools-scm` will error if it fails to detect the
7373
version.
7474

7575
`parse: Callable[[Path, Config], ScmVersion] | None = None`
7676
: A function that will be used instead of the discovered SCM
7777
for parsing the version. Use with caution,
7878
this is a function for advanced use and you should be
79-
familiar with the `setuptools_scm` internals to use it.
79+
familiar with the `setuptools-scm` internals to use it.
8080

8181
`git_describe_command`
8282
: This command will be used instead the default `git describe --long` command.
@@ -96,7 +96,7 @@ Callables or other Python objects have to be passed in `setup.py` (via the `use_
9696

9797
The [setuptools_scm.NonNormalizedVersion][] convenience class is
9898
provided to disable the normalization step done by
99-
`packaging.version.Version`. If this is used while `setuptools_scm`
99+
`packaging.version.Version`. If this is used while `setuptools-scm`
100100
is integrated in a setuptools packaging process, the non-normalized
101101
version number will appear in all files (see `version_file` note).
102102

@@ -121,7 +121,7 @@ Callables or other Python objects have to be passed in `setup.py` (via the `use_
121121
in which case it will be an unparsed string.
122122
Specifying distribution-specific pretend versions will
123123
avoid possible collisions with third party distributions
124-
also using ``setuptools_scm``
124+
also using ``setuptools-scm``
125125

126126
the dist name normalization follows adapted PEP 503 semantics, with one or
127127
more of ".-\_" being replaced by a single "\_", and the name being upper-cased

docs/customizing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
## providing project local version schemes
44

55
As PEP 621 provides no way to specify local code as a build backend plugin,
6-
setuptools_scm has to piggyback on setuptools for passing functions over.
6+
setuptools-scm has to piggyback on setuptools for passing functions over.
77

88
To facilitate that one needs to write a `setup.py` file and
9-
pass partial setuptools_scm configuration in via the use_scm_version keyword.
9+
pass partial setuptools-scm configuration in via the use_scm_version keyword.
1010

1111
It's strongly recommended to experiment with using stock version schemes or creating plugins as package.
1212
(This recommendation will change if there ever is something like build-time entrypoints).
@@ -33,7 +33,7 @@ setup(use_scm_version={"version_scheme": myversion_func})
3333

3434
``` { .toml title="pyproject.toml" file="docs/examples/version_scheme_code/pyproject.toml" }
3535
[build-system]
36-
requires = ["setuptools>=64", "setuptools_scm>=8"]
36+
requires = ["setuptools>=64", "setuptools-scm>=8"]
3737
build-backend = "setuptools.build_meta"
3838

3939
[project]
@@ -52,7 +52,7 @@ dynamic = [
5252

5353
## Importing in setup.py
5454

55-
With the pep 517/518 build backend, setuptools_scm is importable from `setup.py`
55+
With the pep 517/518 build backend, setuptools-scm is importable from `setup.py`
5656

5757
``` { .python title="setup.py" }
5858
import setuptools
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ~/~ begin <<docs/customizing.md#docs/examples/version_scheme_code/pyproject.toml>>[init]
22
[build-system]
3-
requires = ["setuptools>=64", "setuptools_scm>=8"]
3+
requires = ["setuptools>=64", "setuptools-scm>=8"]
44
build-backend = "setuptools.build_meta"
55

66
[project]
@@ -10,4 +10,4 @@ dynamic = [
1010
]
1111

1212
[tool.setuptools_scm]
13-
# ~/~ end
13+
# ~/~ end

docs/extending.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Extending setuptools_scm
1+
# Extending setuptools-scm
22

3-
`setuptools_scm` uses [entry-point][entry-point] based hooks to extend its default capabilities.
3+
`setuptools-scm` uses [entry-point][entry-point] based hooks to extend its default capabilities.
44

55
[entry-point]: https://packaging.python.org/en/latest/specifications/entry-points/
66

77
## Adding a new SCM
88

9-
`setuptools_scm` provides two entrypoints for adding new SCMs:
9+
`setuptools-scm` provides two entrypoints for adding new SCMs:
1010

1111
`setuptools_scm.parse_scm`
1212
: A function used to parse the metadata of the current workdir

docs/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# About
22

3-
`setuptools_scm` extracts Python package versions from `git` or `hg` metadata
3+
`setuptools-scm` extracts Python package versions from `git` or `hg` metadata
44
instead of declaring them as the version argument
55
or in a Source Code Managed (SCM) managed file.
66

7-
Additionally `setuptools_scm` provides `setuptools` with a list of
7+
Additionally `setuptools-scm` provides `setuptools` with a list of
88
files that are managed by the SCM
99
(i.e. it automatically adds all the SCM-managed files to the sdist).
1010
Unwanted files must be excluded via `MANIFEST.in`
@@ -16,13 +16,13 @@ or [configuring Git archive][git-archive-docs].
1616

1717
### with setuptools
1818

19-
Note: `setuptools_scm>=8` intentionally doesn't depend on setuptools to ease non-setuptools usage.
19+
Note: `setuptools-scm>=8` intentionally doesn't depend on setuptools to ease non-setuptools usage.
2020
Please ensure a recent version of setuptools (>=64) is installed.
2121

2222

2323
```toml title="pyproject.toml"
2424
[build-system]
25-
requires = ["setuptools>=64", "setuptools_scm>=8"]
25+
requires = ["setuptools>=64", "setuptools-scm>=8"]
2626
build-backend = "setuptools.build_meta"
2727

2828
[project]
@@ -39,6 +39,6 @@ dynamic = ["version"]
3939

4040
### with hatch
4141

42-
[Hatch-vcs](https://github.com/ofek/hatch-vcs) integrates with setuptools_scm
42+
[Hatch-vcs](https://github.com/ofek/hatch-vcs) integrates with setuptools-scm
4343
but provides its own configuration options,
4444
please see its [documentation](https://github.com/ofek/hatch-vcs#readme)

docs/overrides.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## pretend versions
44

5-
setuptools_scm provides a mechanism to override the version number build time.
5+
setuptools-scm provides a mechanism to override the version number build time.
66

77
the environment variable `SETUPTOOLS_SCM_PRETEND_VERSION` is used
88
as the override source for the version number unparsed string.
@@ -12,7 +12,7 @@ where the dist name normalization follows adapted PEP 503 semantics.
1212

1313
## config overrides
1414

15-
setuptools_scm parses the environment variable `SETUPTOOLS_SCM_OVERRIDES_FOR_${NORMALIZED_DIST_NAME}`
15+
setuptools-scm parses the environment variable `SETUPTOOLS_SCM_OVERRIDES_FOR_${NORMALIZED_DIST_NAME}`
1616
as a toml inline map to override the configuration data from `pyproject.toml`.
1717

1818
## subprocess timeouts

docs/usage.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22

33
## at build time
44

5-
The preferred way to configure `setuptools_scm` is to author
5+
The preferred way to configure `setuptools-scm` is to author
66
settings in the `tool.setuptools_scm` section of `pyproject.toml`.
77

88
It's necessary to use a setuptools version released after 2022.
99

1010
```toml title="pyproject.toml"
1111
[build-system]
12-
requires = ["setuptools>=64", "setuptools_scm>=8"]
12+
requires = ["setuptools>=64", "setuptools-scm>=8"]
1313
build-backend = "setuptools.build_meta"
1414

1515
[project]
1616
# version = "0.0.1" # Remove any existing version parameter.
1717
dynamic = ["version"]
1818

1919
[tool.setuptools_scm]
20-
# can be empty if no extra settings are needed, presence enables setuptools_scm
20+
# can be empty if no extra settings are needed, presence enables setuptools-scm
2121
```
2222

23-
That will be sufficient to require `setuptools_scm` for projects
23+
That will be sufficient to require `setuptools-scm` for projects
2424
that support PEP 518 ([pip](https://pypi.org/project/pip) and
2525
[pep517](https://pypi.org/project/pep517/)).
2626
Tools that still invoke `setup.py` must ensure build requirements are installed
@@ -46,7 +46,7 @@ $ python -m setuptools_scm --help
4646

4747
If you need to confirm which version string is being generated
4848
or debug the configuration, you can install
49-
[setuptools-scm](https://github.com/pypa/setuptools_scm)
49+
[setuptools-scm](https://github.com/pypa/setuptools-scm)
5050
directly in your working environment and run:
5151

5252
```commandline
@@ -77,15 +77,15 @@ $ python -m setuptools_scm ls # output trimmed for brevity
7777

7878
## at runtime (strongly discouraged)
7979

80-
the most simple **looking** way to use `setuptools_scm` at runtime is:
80+
the most simple **looking** way to use `setuptools-scm` at runtime is:
8181

8282
```python
8383
from setuptools_scm import get_version
8484
version = get_version()
8585
```
8686

8787

88-
In order to use `setuptools_scm` from code that is one directory deeper
88+
In order to use `setuptools-scm` from code that is one directory deeper
8989
than the project's root, you can use:
9090

9191
```python
@@ -172,7 +172,7 @@ is preferred over `SETUPTOOLS_SCM_PRETEND_VERSION`.
172172

173173
## Default versioning scheme
174174

175-
In the standard configuration `setuptools_scm` takes a look at three things:
175+
In the standard configuration `setuptools-scm` takes a look at three things:
176176

177177
1. latest tag (with a version number)
178178
2. the distance to this tag (e.g. number of revisions since latest tag)
@@ -261,14 +261,14 @@ $ git add .git_archival.txt .gitattributes && git commit -m "add export config"
261261
Note that if you are creating a `_version.py` file, note that it should not
262262
be kept in version control. It's strongly recommended to be put into gitignore.
263263

264-
[git-archive-issue]: https://github.com/pypa/setuptools_scm/issues/806
264+
[git-archive-issue]: https://github.com/pypa/setuptools-scm/issues/806
265265

266266
### File finders hook makes most of `MANIFEST.in` unnecessary
267267

268-
`setuptools_scm` implements a [file_finders] entry point
268+
`setuptools-scm` implements a [file_finders] entry point
269269
which returns all files tracked by your SCM.
270270
This eliminates the need for a manually constructed `MANIFEST.in` in most cases where this
271-
would be required when not using `setuptools_scm`, namely:
271+
would be required when not using `setuptools-scm`, namely:
272272

273273
* To ensure all relevant files are packaged when running the `sdist` command.
274274
* When using [include_package_data] to include package data as part of the `build` or `bdist_wheel`.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ toml = [
6868
]
6969
[project.urls]
7070
documentation = "https://setuptools-scm.readthedocs.io/"
71-
repository = "https://github.com/pypa/setuptools_scm/"
71+
repository = "https://github.com/pypa/setuptools-scm/"
7272
[project.entry-points."distutils.setup_keywords"]
7373
use_scm_version = "setuptools_scm._integration.setuptools:version_keyword"
7474
[project.entry-points."pipx.run"]

src/setuptools_scm/_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _get_cli_opts(args: list[str] | None) -> argparse.Namespace:
6161
"--config",
6262
default=None,
6363
metavar="PATH",
64-
help="path to 'pyproject.toml' with setuptools_scm config, "
64+
help="path to 'pyproject.toml' with setuptools-scm config, "
6565
"default: looked up in the current or parent directories",
6666
)
6767
parser.add_argument(
@@ -89,7 +89,7 @@ def _get_cli_opts(args: list[str] | None) -> argparse.Namespace:
8989
"--query",
9090
type=str.casefold,
9191
nargs="*",
92-
help="display setuptools_scm settings according to query, "
92+
help="display setuptools-scm settings according to query, "
9393
"e.g. dist_name, do not supply an argument in order to "
9494
"print a list of valid queries.",
9595
)

src/setuptools_scm/_get_version_impl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def get_version(
149149
"""
150150
If supplied, relative_to should be a file from which root may
151151
be resolved. Typically called by a script or module that is not
152-
in the root of the repository to direct setuptools_scm to the
152+
in the root of the repository to direct setuptools-scm to the
153153
root of the repository by supplying ``__file__``.
154154
"""
155155

src/setuptools_scm/_integration/dump_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
TEMPLATES = {
1515
".py": """\
16-
# file generated by setuptools_scm
16+
# file generated by setuptools-scm
1717
# don't change, don't track in version control
1818
TYPE_CHECKING = False
1919
if TYPE_CHECKING:

src/setuptools_scm/_integration/setuptools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ def _warn_on_old_setuptools(_version: str = setuptools.__version__) -> None:
3131
warnings.warn(
3232
RuntimeWarning(
3333
f"""
34-
ERROR: setuptools=={_version} is used in combination with setuptools_scm>=8.x
34+
ERROR: setuptools=={_version} is used in combination with setuptools-scm>=8.x
3535
3636
Your build configuration is incomplete and previously worked by accident!
37-
setuptools_scm requires setuptools>=61
37+
setuptools-scm requires setuptools>=61
3838
3939
Suggested workaround if applicable:
4040
- migrating from the deprecated setup_requires mechanism to pep517/518
@@ -113,7 +113,7 @@ def infer_version(dist: setuptools.Distribution) -> None:
113113
dist_name = read_dist_name_from_setup_cfg()
114114
if not os.path.isfile("pyproject.toml"):
115115
return
116-
if dist_name == "setuptools_scm":
116+
if dist_name == "setuptools-scm":
117117
return
118118
try:
119119
config = _config.Configuration.from_file(dist_name=dist_name)

0 commit comments

Comments
 (0)