Skip to content

Introduce automatic versioning for pre-release usage #161

@jpbrodrick89

Description

@jpbrodrick89

Currently the version number 0.0.8 is hardcoded in pyproject.toml meaning that if I install from the main github branch pip will tell me I have installed 0.0.8 even though it differs from the version on PyPi. If I already have the PyPi version installed I'm not even sure pip will reinstall as it thinks I am up to date.

This can be solved using automatic versioning tools such as hatch-vcs which bases versions solely on GitHub tags, e.g.:

[project]
...
dynamic=["version"]

[build-system]
requires = ["hatchling", "hatch-vcs", "toml"]
build-backend = "hatchling.build"

[tool.hatch.version]
source = "vcs"

[tool.hatch.build.hooks.vcs]
version-file = "lineax/_version.py"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions