Skip to content

Commit

Permalink
Add dependency in pyproject.toml, don't require it for hook
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleFromNVIDIA committed Jun 14, 2024
1 parent 88646a5 commit 43a9441
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ classifiers = [
"Programming Language :: Python :: 3",
]
requires-python = ">=3.9"
dependencies = [
"packaging",
]

[project.scripts]
rapids-metadata-json = "rapids_metadata.json:main"
Expand Down
4 changes: 2 additions & 2 deletions src/rapids_metadata/rapids_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
import os.path
from os import PathLike

from packaging.version import InvalidVersion, Version


__all__ = ["get_rapids_version"]


def get_rapids_version(directory: PathLike) -> str:
from packaging.version import InvalidVersion, Version

while not os.path.samefile(directory, os.path.dirname(directory)):
try:
with open(os.path.join(directory, "VERSION")) as f:
Expand Down

0 comments on commit 43a9441

Please sign in to comment.