Skip to content
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

Use correct PEP 440 fallback version #86

Open
johnmhoran opened this issue Jan 25, 2024 · 0 comments
Open

Use correct PEP 440 fallback version #86

johnmhoran opened this issue Jan 25, 2024 · 0 comments

Comments

@johnmhoran
Copy link
Member

The current fallback version generates an incorrect result when git export-subst is applied to replace the placeholders; and pip and setuptools complain with this error message (when using [email protected] to explore the process):

setuptools.extern.packaging.version.InvalidVersion: Invalid version: '9999.d0a3fa9-2023-12-19'

We should instead use this modified fallback version:

fallback_version = "9999+$Format:%h$"

See, e.g.,

and

[tool.setuptools_scm]
# this is used populated when creating a git archive
# and when there is .git dir and/or there is no git installed
fallback_version = "9999.$Format:%h-%cs$"
# Ignore all Git auto CR/LF line endings conversions
* -text
pyproject.toml export-subst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant