Skip to content

build: add dynamic git-versioning, drop rc0, migrate to setuptools#485

Merged
ko3n1g merged 6 commits intomainfrom
ko3n1g/build/dynamic-git-versioning
Apr 9, 2026
Merged

build: add dynamic git-versioning, drop rc0, migrate to setuptools#485
ko3n1g merged 6 commits intomainfrom
ko3n1g/build/dynamic-git-versioning

Conversation

@ko3n1g
Copy link
Copy Markdown
Contributor

@ko3n1g ko3n1g commented Apr 8, 2026

Summary

  • nemo_run/package_info.py: replace packaging.version.Version parsing with standard MAJOR/MINOR/PATCH/PRE_RELEASE pattern; drop rc0 pre-release tag; append +<short-sha> to __version__ at import time using only the git binary. Set NO_VCS_VERSION=1 to opt out.
  • pyproject.toml: migrate build backend from hatchling/hatch-vcs to setuptools; use dynamic version from nemo_run.package_info.__version__; remove packaging from runtime deps (no longer needed).
  • build-test-publish-wheel.yml: pin FW-CI-templates to the commit that sets NO_VCS_VERSION=1 in the build step env (prevents sdist/wheel version mismatch); switch packaging input to setuptools.

Example

>>> import nemo_run; nemo_run.__version__
'0.10.0+55592c8'

# Opt-out:
NO_VCS_VERSION=1 python -c "import nemo_run; print(nemo_run.__version__)"
0.10.0

- nemo_run/package_info.py: replace packaging.version.Version with
  MAJOR/MINOR/PATCH/PRE_RELEASE pattern; append +<short-sha> to
  __version__ at import time via git binary (NO_VCS_VERSION=1 to opt out)
- pyproject.toml: switch build backend from hatchling to setuptools,
  use dynamic version from nemo_run.package_info.__version__,
  remove packaging runtime dep (no longer needed)
- build-test-publish-wheel.yml: pin FW-CI-templates to commit with
  NO_VCS_VERSION=1 support; switch packaging input to setuptools

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Regenerate lock file after build backend switch (hatchling → setuptools);
bump ibm-cloud-sdk-core 3.18.0 → 3.24.1 to get a pre-built wheel and
avoid sdist build failure in fresh CI environments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
packages = ["nemo_run"] only includes the top-level package;
use find with include = ["nemo_run*"] to capture all subpackages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
@ko3n1g ko3n1g merged commit ca9ecbd into main Apr 9, 2026
24 checks passed
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

Successfully merging this pull request may close these issues.

2 participants