Skip to content

Use correct PEP 440 fallback version #86

@johnmhoran

Description

@johnmhoran

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 fetchcode@0.3.0 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions