diff --git a/python/raft-ann-bench/pyproject.toml b/python/raft-ann-bench/pyproject.toml index ba336d841c..1348343db3 100644 --- a/python/raft-ann-bench/pyproject.toml +++ b/python/raft-ann-bench/pyproject.toml @@ -9,7 +9,7 @@ requires = [ [project] name = "raft-ann-bench" -version = "24.06.00" +dynamic = ["version"] description = "RAFT ANN benchmarks" authors = [ { name = "NVIDIA Corporation" }, @@ -57,3 +57,6 @@ skip = [ "build", "dist", ] + +[tool.setuptools.dynamic] +version = { attr = "raft-ann-bench.__version__" } diff --git a/python/raft-ann-bench/src/raft-ann-bench/VERSION b/python/raft-ann-bench/src/raft-ann-bench/VERSION new file mode 120000 index 0000000000..a4e948506b --- /dev/null +++ b/python/raft-ann-bench/src/raft-ann-bench/VERSION @@ -0,0 +1 @@ +../../../../VERSION \ No newline at end of file diff --git a/python/raft-ann-bench/src/raft-ann-bench/__init__.py b/python/raft-ann-bench/src/raft-ann-bench/__init__.py index 8f2cc34855..80a3b3f284 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/__init__.py +++ b/python/raft-ann-bench/src/raft-ann-bench/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,3 +12,5 @@ # See the License for the specific language governing permissions and # limitations under the License. # + +from ._version import __git_commit__, __version__ diff --git a/python/raft-ann-bench/src/raft-ann-bench/_version.py b/python/raft-ann-bench/src/raft-ann-bench/_version.py new file mode 100644 index 0000000000..6dbb8e81b0 --- /dev/null +++ b/python/raft-ann-bench/src/raft-ann-bench/_version.py @@ -0,0 +1,25 @@ +# Copyright (c) 2023-2024, NVIDIA CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +import importlib.resources + +__version__ = ( + importlib.resources.files("raft-ann-bench") + .joinpath("VERSION") + .read_text() + .strip() +) +__git_commit__ = ""