diff --git a/pyproject.toml b/pyproject.toml index c1cb9bf..4f359f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,9 @@ dependencies = { file = "requirements.in" } [tool.isort] profile = "black" +[tool.buildsys-dateversion] +version-path = "src/buildsys_dateversion/__init__.py" + [build-system] requires = [] backend-path = ["src"] diff --git a/src/buildsys_dateversion/_hooks.py b/src/buildsys_dateversion/_hooks.py index b094f6f..9c4d977 100644 --- a/src/buildsys_dateversion/_hooks.py +++ b/src/buildsys_dateversion/_hooks.py @@ -76,6 +76,10 @@ def _find_version_path(self) -> str: if not file.endswith(".py"): continue + # TODO: revisit handling of multiple matches: + # - assume shortest path is the best? + # - give fatal error? + # - update all of them? path = os.path.join(dirpath, file) LOG.debug("Checking file %s", path) if VERSION_PATTERN.search(open(path).read()):