diff --git a/.gitignore b/.gitignore index 479f68f..aef5c2d 100644 --- a/.gitignore +++ b/.gitignore @@ -158,4 +158,7 @@ cython_debug/ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ \ No newline at end of file +#.idea/ + +# Custom +src/pydevdtk/version.py \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5e9d268..f603a91 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,11 @@ [build-system] -requires = ["hatchling"] build-backend = "hatchling.build" +requires = [ + "hatchling", + "hatch-vcs" +] [project] name = "PyDevDTK" -version = "0.1.0" authors = [ { name="Bojan Sofronievski", email="bojan.drago@gmail.com" }, ] @@ -15,6 +17,7 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ] +dynamic = ["version"] dependencies = [ "numpy>=1.23.3", "matplotlib>=3.5.2" @@ -24,6 +27,20 @@ dependencies = [ "Homepage" = "https://github.com/BojanSof/pydevdtk" "Bug Tracker" = "https://github.com/BojanSof/pydevdtk/issues" +[tool.hatch.version] +source = "vcs" + +[tool.hatch.build.hooks.vcs] +version-file = "src/pydevdtk/version.py" + +[tool.hatch.version.raw-options] +version_scheme="no-guess-dev" + +[tool.hatch.build] +artifacts = [ + "src/pydevdtk/version.py", +] + [tool.black] line-length = 79