Skip to content

Commit ce39201

Browse files
ko3n1gclaude
andcommitted
fix: Fix hatch version parsing by using static version string
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 44dcf8c commit ce39201

2 files changed

Lines changed: 2 additions & 13 deletions

File tree

nemo_run/package_info.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,9 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
from packaging.version import Version
15-
1614
semantic_version = "0.8.1.dev0"
1715

18-
MAJOR = Version(semantic_version).major
19-
MINOR = Version(semantic_version).minor
20-
PATCH = Version(semantic_version).micro
21-
if pre := Version(semantic_version).pre:
22-
PRE_RELEASE = "".join(map(str, pre))
23-
else:
24-
PRE_RELEASE = ""
25-
26-
DEV = Version(semantic_version).dev
27-
28-
__version__ = f"{MAJOR}.{MINOR}.{PATCH}.{PRE_RELEASE}{DEV}"
16+
__version__ = semantic_version
2917

3018
__package_name__ = "nemo_run"
3119
__contact_names__ = "NVIDIA"

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ packages = ["nemo_run"]
151151

152152
[tool.hatch.version]
153153
path = "nemo_run/package_info.py"
154+
pattern = 'semantic_version = "(?P<version>[^"]+)"'
154155

155156
[tool.ruff]
156157
line-length = 100

0 commit comments

Comments
 (0)