Skip to content

Be nicer about possible misconfigurations #1004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 109 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
771046c
cli: extend ls comand for more info
con-f-use Oct 14, 2023
263dc5b
a few fixes and tests
thejcannon Jan 18, 2024
4497912
newline
thejcannon Jan 18, 2024
90810a3
space
thejcannon Jan 18, 2024
d9b4d24
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 18, 2024
cdcc699
pre-commit
thejcannon Jan 18, 2024
5f20c3e
fix bad string
thejcannon Jan 18, 2024
a23d5fe
Add a "only-version" version scheme (#1005)
thejcannon Jan 19, 2024
27ae4d8
chore: hg file finder - use check=True api
RonnyPfannschmidt Jan 5, 2024
2fa7927
chore: has_command - use default timeout automatically
RonnyPfannschmidt Jan 5, 2024
2ac4f08
fix #957 - add subprocess timeout
RonnyPfannschmidt Jan 5, 2024
9193ec9
chore: add exception info to warning logging
RonnyPfannschmidt Jan 5, 2024
027a52d
begin to address #993 - add normcase
RonnyPfannschmidt Jan 8, 2024
6c8c164
fixup #957 - timeout passover for git
RonnyPfannschmidt Jan 8, 2024
b85281d
chore: add py3.12 in tox.ini and add wheel
RonnyPfannschmidt Jan 8, 2024
0c22186
fix #966 - list all variables for version file templates
RonnyPfannschmidt Jan 8, 2024
1ecf351
fix #960: add a ``--force-write-version-files`` flag for the cli
RonnyPfannschmidt Jan 8, 2024
517ed80
fix #953 - info log level for missing tool section
RonnyPfannschmidt Jan 8, 2024
24bb92d
fix #993 and add a test
RonnyPfannschmidt Jan 8, 2024
c9d1bb2
chore: pass correct parameter name fo cli fallback
RonnyPfannschmidt Feb 15, 2024
fa84748
chore: consistently use kwonly args inside config.from_data
RonnyPfannschmidt Feb 15, 2024
fd82193
chore: turn empty tag regex warning into constant
RonnyPfannschmidt Feb 15, 2024
ab6cf05
test fix: correct cli test after pytest 8 exposed a bug
RonnyPfannschmidt Feb 15, 2024
1f57be6
ci fix: unshallow
RonnyPfannschmidt Feb 15, 2024
8cf87be
chore: drop black, flake8 and reoder-python-imports
RonnyPfannschmidt Feb 15, 2024
7225533
fix ruff config
RonnyPfannschmidt Feb 15, 2024
d9b3b29
Merge pull request #996 from RonnyPfannschmidt/ronny/cleanups
RonnyPfannschmidt Feb 15, 2024
5170451
Only depend on typing_extensions for Python < 3.10
dcermak Feb 19, 2024
09095ff
fix non-escaped markdown in docs
JCGoran Feb 21, 2024
58c9758
Merge pull request #1017 from JCGoran/fix_markdown
RonnyPfannschmidt Feb 21, 2024
fee09f4
Merge pull request #1015 from dcermak/typing_extensions-only-for-olde…
RonnyPfannschmidt Feb 28, 2024
88b2fe6
fix #1018 - allow NonNormalizedVersion in semver
RonnyPfannschmidt Mar 5, 2024
82857a4
upgrade pre-commit
RonnyPfannschmidt Mar 5, 2024
59defe7
Merge pull request #1020 from RonnyPfannschmidt/fix-1018-allow-non-no…
RonnyPfannschmidt Mar 5, 2024
45eb1b2
Merge pull request #1021 from RonnyPfannschmidt/pre-commit-upgrade
RonnyPfannschmidt Mar 5, 2024
1f49a81
Apply suggestions from code review
RonnyPfannschmidt Mar 5, 2024
411e933
Merge branch 'main' into main
RonnyPfannschmidt Mar 5, 2024
6f9544a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 5, 2024
739a67c
fix ruff warning on concat
RonnyPfannschmidt Mar 5, 2024
1bac9b5
Merge pull request #959 from con-f-use/main
RonnyPfannschmidt Mar 5, 2024
fa69479
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Mar 12, 2024
773ad45
Merge pull request #1023 from pypa/pre-commit-ci-update-config
RonnyPfannschmidt Mar 13, 2024
53e9930
Read branch data from Mercurial archives
danchr Mar 14, 2024
2bfbb25
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Mar 18, 2024
1ac50c2
Merge pull request #1026 from pypa/pre-commit-ci-update-config
RonnyPfannschmidt Mar 20, 2024
c9b3860
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Mar 25, 2024
d081257
Merge pull request #1027 from pypa/pre-commit-ci-update-config
RonnyPfannschmidt Mar 25, 2024
9ea57a0
Make .git_archival.txt more reproducible
LecrisUT Apr 16, 2024
d8d2b86
Merge pull request #1033 from LecrisUT/fix/git_archival
RonnyPfannschmidt Apr 16, 2024
d75201a
Merge pull request #1024 from danchr/hg-archive-branch
RonnyPfannschmidt Apr 22, 2024
9645373
tests: add git get_head_date test for isoformat dates ending with Z
ap-- May 2, 2024
49a89c9
setuptools_scm.git: fix handling of dates in isoformat ending with Z
ap-- May 2, 2024
3e613cd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 2, 2024
234b74f
Merge pull request #1039 from ap--/fix-timezone-error
RonnyPfannschmidt May 6, 2024
65ac14d
bugfix: use extras in tox to ensure installation of test deps
RonnyPfannschmidt May 6, 2024
bb33eb7
Merge pull request #1043 from RonnyPfannschmidt/fix-tox
RonnyPfannschmidt May 6, 2024
a2ba78a
Exclude bots from generated release notes
hugovk May 8, 2024
67d154a
Merge pull request #1046 from hugovk/exclude-bots
RonnyPfannschmidt May 8, 2024
d37c280
Apply ruff/pyupgrade rule UP031
DimitriPapadopoulos May 8, 2024
573bee1
Apply ruff/flake8-implicit-str-concat rule ISC001
DimitriPapadopoulos May 6, 2024
6d46996
Apply ruff/refurb rule FURB118
DimitriPapadopoulos May 8, 2024
a4f3d38
Merge pull request #1047 from DimitriPapadopoulos/UP_FURB
RonnyPfannschmidt May 11, 2024
102f56a
Merge pull request #1044 from DimitriPapadopoulos/ISC
RonnyPfannschmidt May 15, 2024
15620f3
support `pipx run setuptools_scm`
njzjz Jun 10, 2024
74fa5be
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 10, 2024
f1e8074
Apply ruff/tryceratops rule TRY401
DimitriPapadopoulos Jun 29, 2024
98450d7
Update README.md to correct CI badge status
shenxianpeng Jul 9, 2024
545ce7e
Merge pull request #1055 from shenxianpeng/patch-1
RonnyPfannschmidt Jul 9, 2024
199f90b
Fix a link in usage.md
brettcannon Jul 20, 2024
e161622
Merge pull request #1057 from brettcannon/patch-1
RonnyPfannschmidt Jul 20, 2024
4ec3208
Merge pull request #1053 from DimitriPapadopoulos/TRY401
RonnyPfannschmidt Jul 20, 2024
c0e5743
Documented git archive support in README and docs
jamesbraza Jul 28, 2024
0213170
Merge pull request #1061 from jamesbraza/git-archive-docs
RonnyPfannschmidt Jul 28, 2024
6e81a26
Merge branch 'main' into patch-1
RonnyPfannschmidt Jul 28, 2024
4d0d50b
Merge pull request #1051 from njzjz/patch-1
RonnyPfannschmidt Jul 28, 2024
6f53d67
Apply repo-review rules PP306, PP307, PP308
DimitriPapadopoulos Aug 4, 2024
b3db2c5
Apply repo-review rule PC191
DimitriPapadopoulos Aug 4, 2024
ff50699
Apply repo-review rule RF003
DimitriPapadopoulos Aug 4, 2024
532554f
Apply repo-review rule RF103
DimitriPapadopoulos Aug 4, 2024
715ef95
Apply ruff rules
DimitriPapadopoulos Aug 4, 2024
4a48455
Add repo-review pre-commit hook
DimitriPapadopoulos Aug 6, 2024
6eb52e6
Merge pull request #1063 from DimitriPapadopoulos/repo-review
RonnyPfannschmidt Aug 6, 2024
d0daf6f
Rename the project to setuptools-scm in docs and GitHub.
jaraco Aug 13, 2024
12fc28e
Updated more references to the legacy name in Python code.
jaraco Aug 13, 2024
5f7ba15
Also update URL reference in pyproject.
jaraco Aug 13, 2024
4b29ab9
docs: clarify usage of version files
ianw Aug 23, 2024
d665621
Merge pull request #1068 from jaraco/debt/rename
RonnyPfannschmidt Aug 26, 2024
c8e5505
Updated version.py template to include __all__
jamesbraza Oct 1, 2024
2e0c6a9
Added a CHANGELOG entry
jamesbraza Oct 1, 2024
24d7797
Added 'ruff check' unit test
jamesbraza Oct 3, 2024
be34dd1
Merge pull request #1076 from jamesbraza/all-in-version
RonnyPfannschmidt Oct 3, 2024
24719f2
Better cleanup PYTHONPATH for Mercurial calls (support for PDM)
paugier Oct 23, 2024
3c145df
Merge pull request #1080 from paugier/hg-git_with_pdm
RonnyPfannschmidt Oct 24, 2024
a558f31
pipx.run entry-points should be setuptools-scm
paugier Oct 25, 2024
09c1f51
Add a lower bound pin on setuptools dependency
mayeut Nov 24, 2024
c766df1
Fixes #1090. Pinned requirement to tomli<=2.0.2.
anchal39 Nov 28, 2024
327b428
Add cross-reference from version_scheme config to implementations
maresb Jan 3, 2025
c633987
Remove the word "local" per PEP 440
maresb Jan 3, 2025
34a89a9
Clarify the definition of "local"
maresb Jan 3, 2025
3d8cefe
Add cross-reference from local_scheme config to implementations
maresb Jan 3, 2025
5d3a1f8
Merge pull request #1094 from maresb/version-scheme-docs
RonnyPfannschmidt Jan 4, 2025
15d62ac
Merge pull request #1091 from anchal39/tomli-version-fix
RonnyPfannschmidt Jan 14, 2025
1ddd483
Merge pull request #1088 from mayeut/patch-1
RonnyPfannschmidt Jan 14, 2025
51822d7
Merge branch 'main' into version-file
RonnyPfannschmidt Jan 14, 2025
ae5322b
Merge pull request #1069 from ianw/version-file
RonnyPfannschmidt Jan 14, 2025
051ad96
Merge pull request #1081 from paugier/fix-pipx-command-name
RonnyPfannschmidt Jan 14, 2025
2b0722f
Mention SETUPTOOLS_SCM_PRETEND_VERSION_FOR in error message
paugier Jan 22, 2025
9b6f031
Merge pull request #1102 from paugier/error-message-env-var
RonnyPfannschmidt Jan 23, 2025
d49399b
merge main
RonnyPfannschmidt Feb 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Unreleased

## Changed

- inclusion of `__all__` in autogenerated `version.py` files to aid IDE autoimports

# v8.0.4

Expand All @@ -14,7 +19,7 @@

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



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

## features

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# setuptools_scm
[![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)
# setuptools-scm
[![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)
[![Documentation Status](https://readthedocs.org/projects/setuptools-scm/badge/?version=latest)](https://setuptools-scm.readthedocs.io/en/latest/?badge=latest)
[![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)

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

```toml title="pyproject.toml"
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
requires = ["setuptools>=64", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"
```

Expand Down Expand Up @@ -71,7 +71,7 @@ $ python -m setuptools_scm --help

For further configuration see the [documentation].

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

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

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

Expand Down
14 changes: 8 additions & 6 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ Callables or other Python objects have to be passed in `setup.py` (via the `use_
: Relative path to the SCM root, defaults to `.` and is relative to the file path passed in `relative_to`

`version_scheme : str | Callable[[ScmVersion], str]`
: Configures how the local version number is constructed; either an entrypoint name or a callable.
: Configures how the version number is constructed; either an entrypoint name or a callable.
See [Version number construction](extending.md#setuptools_scmversion_scheme) for predefined implementations.

`local_scheme : str | Callable[[ScmVersion], str]`
: Configures how the local component of the version is constructed
: Configures how the local component of the version (the optional part after the `+`) is constructed;
either an entrypoint name or a callable.
See [Version number construction](extending.md#setuptools_scmlocal_scheme) for predefined implementations.


`version_file: Path | PathLike[str] | None = None`
Expand Down Expand Up @@ -69,14 +71,14 @@ Callables or other Python objects have to be passed in `setup.py` (via the `use_
`fallback_version: str | None = None`
: A version string that will be used if no other method for detecting the
version worked (e.g., when using a tarball with no metadata). If this is
unset (the default), `setuptools_scm` will error if it fails to detect the
unset (the default), `setuptools-scm` will error if it fails to detect the
version.

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

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

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

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

the dist name normalization follows adapted PEP 503 semantics, with one or
more of ".-\_" being replaced by a single "\_", and the name being upper-cased
Expand Down
8 changes: 4 additions & 4 deletions docs/customizing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
## providing project local version schemes

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

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

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

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

[project]
Expand All @@ -52,7 +52,7 @@ dynamic = [

## Importing in setup.py

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

``` { .python title="setup.py" }
import setuptools
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/version_scheme_code/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ~/~ begin <<docs/customizing.md#docs/examples/version_scheme_code/pyproject.toml>>[init]
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
requires = ["setuptools>=64", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -10,4 +10,4 @@ dynamic = [
]

[tool.setuptools_scm]
# ~/~ end
# ~/~ end
6 changes: 3 additions & 3 deletions docs/extending.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Extending setuptools_scm
# Extending setuptools-scm

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

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

## Adding a new SCM

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

`setuptools_scm.parse_scm`
: A function used to parse the metadata of the current workdir
Expand Down
10 changes: 5 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# About

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

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

### With setuptools

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


```toml title="pyproject.toml"
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
requires = ["setuptools>=64", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -39,6 +39,6 @@ dynamic = ["version"]

### With hatch

[Hatch-vcs](https://github.com/ofek/hatch-vcs) integrates with setuptools_scm
[Hatch-vcs](https://github.com/ofek/hatch-vcs) integrates with setuptools-scm
but provides its own configuration options,
please see its [documentation](https://github.com/ofek/hatch-vcs#readme)
4 changes: 2 additions & 2 deletions docs/overrides.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## pretend versions

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

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

## config overrides

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

## subprocess timeouts
Expand Down
19 changes: 9 additions & 10 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

## At build time

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

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

```toml title="pyproject.toml"
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
requires = ["setuptools>=64", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"

[project]
# version = "0.0.1" # Remove any existing version parameter.
dynamic = ["version"]

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

That will be sufficient to require `setuptools_scm` for projects
That will be sufficient to require `setuptools-scm` for projects
that support PEP 518 ([pip](https://pypi.org/project/pip) and
[pep517](https://pypi.org/project/pep517/)).
Tools that still invoke `setup.py` must ensure build requirements are installed
Expand All @@ -46,7 +46,7 @@ the runtime discussion below for more details.

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

```commandline
Expand Down Expand Up @@ -79,7 +79,6 @@ To explore other options, try

```commandline
$ python -m setuptools_scm --help
```

## At runtime

Expand Down Expand Up @@ -192,7 +191,7 @@ is preferred over `SETUPTOOLS_SCM_PRETEND_VERSION`.

## Default versioning scheme

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

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

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

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

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

* To ensure all relevant files are packaged when running the `sdist` command.
* When using [include_package_data] to include package data as part of the `build` or `bdist_wheel`.
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
build-backend = "_own_version_helper:build_meta"
requires = [
"setuptools>=61",
'tomli; python_version < "3.11"',
'tomli<=2.0.2; python_version < "3.11"',
]
backend-path = [
".",
Expand Down Expand Up @@ -41,7 +41,7 @@ dynamic = [
]
dependencies = [
"packaging>=20",
"setuptools",
"setuptools>=61",
'tomli>=1; python_version < "3.11"',
'typing-extensions; python_version < "3.10"',
]
Expand All @@ -68,7 +68,7 @@ toml = [
]
[project.urls]
documentation = "https://setuptools-scm.readthedocs.io/"
repository = "https://github.com/pypa/setuptools_scm/"
repository = "https://github.com/pypa/setuptools-scm/"
[project.entry-points."distutils.setup_keywords"]
use_scm_version = "setuptools_scm._integration.setuptools:version_keyword"
[project.entry-points."pipx.run"]
Expand Down
4 changes: 2 additions & 2 deletions src/setuptools_scm/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def _get_cli_opts(args: list[str] | None) -> argparse.Namespace:
"--config",
default=None,
metavar="PATH",
help="path to 'pyproject.toml' with setuptools_scm config, "
help="path to 'pyproject.toml' with setuptools-scm config, "
"default: looked up in the current or parent directories",
)
parser.add_argument(
Expand Down Expand Up @@ -89,7 +89,7 @@ def _get_cli_opts(args: list[str] | None) -> argparse.Namespace:
"--query",
type=str.casefold,
nargs="*",
help="display setuptools_scm settings according to query, "
help="display setuptools-scm settings according to query, "
"e.g. dist_name, do not supply an argument in order to "
"print a list of valid queries.",
)
Expand Down
2 changes: 1 addition & 1 deletion src/setuptools_scm/_get_version_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def get_version(
"""
If supplied, relative_to should be a file from which root may
be resolved. Typically called by a script or module that is not
in the root of the repository to direct setuptools_scm to the
in the root of the repository to direct setuptools-scm to the
root of the repository by supplying ``__file__``.
"""

Expand Down
9 changes: 7 additions & 2 deletions src/setuptools_scm/_integration/dump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@

TEMPLATES = {
".py": """\
# file generated by setuptools_scm
# file generated by setuptools-scm
# don't change, don't track in version control

__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]

TYPE_CHECKING = False
if TYPE_CHECKING:
from typing import Tuple, Union
from typing import Tuple
from typing import Union

VERSION_TUPLE = Tuple[Union[int, str], ...]
else:
VERSION_TUPLE = object
Expand Down
6 changes: 3 additions & 3 deletions src/setuptools_scm/_integration/setuptools.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ def _warn_on_old_setuptools(_version: str = setuptools.__version__) -> None:
warnings.warn(
RuntimeWarning(
f"""
ERROR: setuptools=={_version} is used in combination with setuptools_scm>=8.x
ERROR: setuptools=={_version} is used in combination with setuptools-scm>=8.x

Your build configuration is incomplete and previously worked by accident!
setuptools_scm requires setuptools>=61
setuptools-scm requires setuptools>=61

Suggested workaround if applicable:
- migrating from the deprecated setup_requires mechanism to pep517/518
Expand Down Expand Up @@ -113,7 +113,7 @@ def infer_version(dist: setuptools.Distribution) -> None:
dist_name = read_dist_name_from_setup_cfg()
if not os.path.isfile("pyproject.toml"):
return
if dist_name == "setuptools_scm":
if dist_name == "setuptools-scm":
return
try:
config = _config.Configuration.from_file(dist_name=dist_name)
Expand Down
Loading
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy