Skip to content

Commit 28c8d52

Browse files
committed
Provide more documentation on the SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ variable
1 parent b8640b1 commit 28c8d52

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ breaking
1515
and where hiding dirty states that are now explicitly dirty
1616
* depend on later importlib for the full selectable api
1717
* move setuptools integration code to private sub-package
18+
* use normalized dist names for the SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${DIST_NAME}
1819

1920
features
2021
--------

README.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ Note that running this Dockerfile requires docker with BuildKit enabled
262262
`[docs] <https://github.com/moby/buildkit/blob/v0.8.3/frontend/dockerfile/docs/syntax.md>`_.
263263

264264
To avoid BuildKit and mounting of the .git folder altogether, one can also pass the desired
265-
version as a build argument. Note that ``SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${UPPERCASED_DIST_NAME}``
265+
version as a build argument. Note that ``SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${NORMALIZED_DIST_NAME}``
266266
is preferred over ``SETUPTOOLS_SCM_PRETEND_VERSION``.
267267

268268

@@ -500,12 +500,15 @@ Environment variables
500500
:SETUPTOOLS_SCM_PRETEND_VERSION:
501501
when defined and not empty,
502502
its used as the primary source for the version number
503-
in which case it will be a unparsed string
503+
in which case it will be an unparsed string
504504

505-
:SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${UPPERCASED_DIST_NAME}:
505+
:SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${NORMALIZED_DIST_NAME}:
506506
when defined and not empty,
507507
its used as the primary source for the version number
508-
in which case it will be a unparsed string
508+
in which case it will be an unparsed string
509+
510+
the dist name normalization follows adapted PEP-503 semantics, with one or
511+
more of ".-_" being replaced by a single "_", and the name being upper-cased
509512

510513
it takes precedence over ``SETUPTOOLS_SCM_PRETEND_VERSION``
511514

0 commit comments

Comments
 (0)