diff --git a/.gitignore b/.gitignore index 829888e..b637372 100644 --- a/.gitignore +++ b/.gitignore @@ -41,5 +41,8 @@ htmlcov/ .pytest_cache/ .mypy_cache/ +# Generated version file +src/cocoindex_code/_version.py + # CocoIndex .cocoindex_code/ diff --git a/pyproject.toml b/pyproject.toml index 2488987..89225f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,6 +55,10 @@ Issues = "https://github.com/cocoindex-io/cocoindex-code/issues" [tool.hatch.version] source = "vcs" +fallback-version = "999.0.0" + +[tool.hatch.build.hooks.vcs] +version-file = "src/cocoindex_code/_version.py" [tool.hatch.build.targets.wheel] packages = ["src/cocoindex_code"] diff --git a/src/cocoindex_code/_version.py b/src/cocoindex_code/_version.py deleted file mode 100644 index 7fa6f60..0000000 --- a/src/cocoindex_code/_version.py +++ /dev/null @@ -1,3 +0,0 @@ -# This file will be rewritten by the release workflow. -# DO NOT ADD ANYTHING ELSE TO THIS FILE. -__version__ = "999.0.0"