Files
boltage/pyproject.toml
T
Bart BroereandClaude Opus 5.5 ee980b27fe Derive the version from git with verri
Use verri's strawberry flavour through hatchling's code version source, so
versions look like 2026.10.21.0: the HEAD commit date plus the number of
earlier commits that day.

Container images build the sdist in a separate stage that has the git
repository, so they get the same version instead of a +vcs.missing one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:44:26 +02:00

62 lines
1.9 KiB
TOML

# SPDX-FileCopyrightText: 2026 Bart Broere
# SPDX-License-Identifier: GPL-3.0-or-later
[build-system]
requires = ["hatchling>=1.27", "hatch-fancy-pypi-readme>=24.1", "verri>=2026.10.11"]
build-backend = "hatchling.build"
[project]
name = "peo"
dynamic = ["version", "readme"]
description = "neo4j-browser and Neo4j drivers on top of PostgreSQL, using Apache AGE as the graph engine"
license = "GPL-3.0-or-later"
license-files = ["LICENSE"]
authors = [{ name = "Bart Broere" }]
requires-python = ">=3.11"
dependencies = ["psycopg>=3.1", "websockets>=13"]
keywords = ["neo4j", "bolt", "cypher", "postgresql", "apache-age", "graph"]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"Topic :: Database",
]
[project.optional-dependencies]
binary = ["psycopg[binary]>=3.1"]
browser = ["starlette>=0.37", "uvicorn>=0.29"]
[project.urls]
Source = "https://git.bartbroe.re/bartbroere/peo"
[project.scripts]
peo = "peo.__main__:run"
# The version is derived from the date of the HEAD commit, plus the number of
# commits made earlier that day, like 2026.10.21.0. See version.py.
[tool.hatch.version]
source = "code"
path = "version.py"
expression = "strawberry()"
[tool.hatch.build.targets.sdist]
include = ["/peo", "/README.md", "/LICENSE", "/version.py"]
[tool.hatch.build.targets.wheel]
packages = ["peo"]
# The README links to other files in the repository with relative links, which
# do not work on PyPI. Make them absolute in the package metadata only.
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.md"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
pattern = '\]\(#'
replacement = '](https://git.bartbroe.re/bartbroere/peo#'
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
pattern = '\]\((?![a-z]+:|#)([^)]+)\)'
replacement = '](https://git.bartbroe.re/bartbroere/peo/src/branch/main/\1)'