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

Automatically inject version #1196

Open
jochenklar opened this issue Nov 15, 2024 · 0 comments
Open

Automatically inject version #1196

jochenklar opened this issue Nov 15, 2024 · 0 comments

Comments

@jochenklar
Copy link
Member

jochenklar commented Nov 15, 2024

Apearantly https://setuptools-scm.readthedocs.io is able to get a version from the current or past git tags and writes it in a _version.py file.

requires = ["setuptools", "setuptools_scm", "wheel"]

...

[tool.setuptools_scm]
version_file = "rdmo/_version.py"

...

We could use that together with:

try:
    from ._version import __version__, __version_tuple__, version, version_tuple
except ImportError:
    __version__ = __version_tuple__ = version = version_tuple = None

in __init__.py and never update versions again. (Not testes with RDMO yet.)

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