[build-system]
requires = [
    "poetry-core>=1.1.0",
    "cython==3.0.10",
    "setuptools>=67.8.0",
    "poetry-dynamic-versioning>=0.22.0"
]
build-backend = "poetry_dynamic_versioning.backend"


[tool.poetry]
name = "wax"
version = "0.0.0"
description = ""
repository = "https://gitlab.syncad.com/hive/wax"
authors = []
packages = [
    { include = "wax"},
    { include = "wax/proto" }
]

[tool.poetry.build]
script = "build.py"
generate-setup-file = true

[tool.poetry.dependencies]
python = "^3.10"
protobuf = "4.24.4"

[tool.poetry.dev-dependencies]
pytest = "7.4.2"
types-setuptools = ">=67.8.0"
mypy-protobuf = "3.5.0"
types-protobuf = "4.24.0.3"
grpcio = "1.59.0"
grpc-stubs = "1.53.0.2"
grpcio-tools = "1.59.0"


[tool.poetry-dynamic-versioning]
enable = true
format-jinja = """
    {%- set dirty_postfix = '.dirty' if dirty else '' -%}
    {%- if distance == 0 and not dirty -%}
        {{ serialize_pep440(base, stage, revision) }}
    {%- elif revision is not none -%}
        {{ serialize_pep440(base, stage, revision + 1, dev=distance, metadata=[commit]) }}{{ dirty_postfix }}
    {%- else -%}
        {{ serialize_pep440(bump_version(base), stage, revision, dev=distance, metadata=[commit]) }}{{ dirty_postfix }}
    {%- endif -%}
"""

[tool.poetry-dynamic-versioning.substitution]
files = [
    "wax/__init__.py",
]
