From 8d74ed8110e026d79f7d8180edd5ad9a47bffe0f Mon Sep 17 00:00:00 2001 From: Robert Taylor Date: Mon, 9 Jan 2023 16:43:48 +0000 Subject: [PATCH] Use git tags to version releases --- Coriolis/__init__.py | 2 ++ pyproject.toml | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Coriolis/__init__.py b/Coriolis/__init__.py index 49e03f5b..a6d08cae 100644 --- a/Coriolis/__init__.py +++ b/Coriolis/__init__.py @@ -3,6 +3,8 @@ import os import sys import subprocess +__version__ = "0.0.0" + #TODO not PEP302 complient -probably a big porting job coriolis_package_dir = os.path.abspath(os.path.dirname(__file__)) diff --git a/pyproject.toml b/pyproject.toml index 32525e46..5c33ef56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "Coriolis" -version = "2.5.0" +version = "0.0.0" description = "Place and Route for semiconductors" authors = ["Jean-Paul Chaput "] readme = "README.rst" @@ -9,6 +9,18 @@ packages = [ { include = "Coriolis"} ] +[tool.poetry-dynamic-versioning] +enable = true +dirty = true +vcs = "git" +style = "pep440" +pattern = ''' + (?x) + ^coriolis-((?P\d+)!)?(?P\d+(\.\d+)*) + ([-._]?((?P[a-zA-Z]+)[-._]?(?P\d+)?))? + (\+(?P.+))?$ +''' + [tool.poetry.dependencies] python = "^3.8" find-libpython = "^0.3.0" @@ -24,8 +36,8 @@ unittests = 'Coriolis:unittests' yosys_coriolis = 'Coriolis:yosys_coriolis' [build-system] -requires = ["poetry-core", "setuptools", "cmake", "ninja", "patchelf"] -build-backend = "poetry.core.masonry.api" +requires = ["poetry-core", "setuptools", "cmake", "ninja", "patchelf", "poetry-dynamic-versioning"] +build-backend = "poetry_dynamic_versioning.backend" [tool.cibuildwheel.linux] skip = ["cp36-*", "cp37-*", "pp*"]