Skip to content

Commit e4b1a08

Browse files
committed
Update pyproject.toml for uv
1 parent 679eaad commit e4b1a08

File tree

3 files changed

+48
-49
lines changed

3 files changed

+48
-49
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,5 @@ dmypy.json
282282

283283
# Cython debug symbols
284284
cython_debug/
285-
poetry.lock
285+
uv.lock
286+
version.py

bootstrap_python_package/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ==============================================================================
2-
# Copyright (c) 2024 Federico Busetti =
2+
# Copyright (c) 2025 Federico Busetti =
33
# <729029+febus982@users.noreply.github.com> =
44
# =
55
# Permission is hereby granted, free of charge, to any person obtaining a =
@@ -21,9 +21,6 @@
2121
# DEALINGS IN THE SOFTWARE. =
2222
# ==============================================================================
2323

24-
__version__ = "0.0.0"
25-
__version_tuple__ = (0, 0, 0)
26-
2724

2825
def some_function() -> str:
2926
"""

pyproject.toml

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
[tool.poetry]
1+
[project]
22
name = "bootstrap-python-package"
3-
version = "0.0.0"
3+
dynamic = ["version"]
44
description = "A manager to easily handle multiple SQLAlchemy configurations"
5-
license = "MIT"
6-
authors = ["Federico Busetti <729029+febus982@users.noreply.github.com>"]
7-
repository = "https://github.com/febus982/bootstrap-python-package"
8-
homepage = "https://febus982.github.io/bootstrap-python-package"
5+
authors = [{ name = "Federico Busetti", email = "729029+febus982@users.noreply.github.com" }]
6+
requires-python = ">=3.9,<3.14"
97
readme = "README.md"
10-
packages = [{include = "bootstrap_python_package"}]
11-
#keywords = ["add", "keywords", "here"]
8+
license = "MIT"
129
classifiers = [
1310
"Development Status :: 4 - Beta",
1411
"Framework :: AsyncIO",
@@ -24,54 +21,58 @@ classifiers = [
2421
"Programming Language :: Python :: 3.11",
2522
"Programming Language :: Python :: 3.12",
2623
"Programming Language :: Python :: 3.13",
27-
"Typing :: Typed"
24+
"Typing :: Typed",
2825
]
2926

30-
[tool.poetry-dynamic-versioning]
31-
enable = false
27+
[project.urls]
28+
Homepage = "https://febus982.github.io/bootstrap-python-package"
29+
Repository = "https://github.com/febus982/bootstrap-python-package"
3230

33-
[build-system]
34-
requires = ["poetry-core", "poetry-dynamic-versioning"]
35-
build-backend = "poetry_dynamic_versioning.backend"
31+
[dependency-groups]
32+
dev = [
33+
"coverage>=6.5.0",
34+
"mkdocs>=1.4.3",
35+
"mkdocstrings[python]>=0.24.0",
36+
"mkdocs-awesome-pages-plugin",
37+
"mkdocs-macros-adr-summary",
38+
"mkdocs-gen-files>=0.5.0",
39+
"mkdocs-material>=9.1.16",
40+
"mike>=2.0.0",
41+
"mypy>=0.990",
42+
"pymdown-extensions>=10.0.1",
43+
"pytest>=8.0.0,<9",
44+
"pytest-asyncio>=0.20.3",
45+
"pytest-cov>=4.0.0",
46+
"pytest-factoryboy>=2.5.0",
47+
"pytest-xdist>=3.0.2",
48+
"ruff>=0.0.263",
49+
"tox>=4.12.1",
50+
"tox-uv>=1.26.0",
51+
"uv-dynamic-versioning>=0.8.2",
52+
]
3653

37-
############################
38-
### Package requirements ###
39-
############################
54+
[build-system]
55+
requires = ["hatchling", "uv-dynamic-versioning"]
56+
build-backend = "hatchling.build"
4057

41-
[tool.poetry.dependencies]
42-
python = ">=3.9,<3.14"
58+
[tool.hatch.build.targets.sdist]
59+
include = ["bootstrap_python_package"]
4360

44-
[tool.poetry.group.dev]
45-
optional = true
61+
[tool.hatch.build.targets.wheel]
62+
include = ["bootstrap_python_package"]
4663

47-
[tool.poetry.group.dev.dependencies]
48-
coverage = ">=6.5.0"
49-
mkdocs = ">=1.4.3"
50-
mkdocstrings = { version = ">=0.24.0", extras = ["python"] }
51-
mkdocs-awesome-pages-plugin = "*"
52-
mkdocs-macros-adr-summary = "*"
53-
mkdocs-gen-files = ">=0.5.0"
54-
mkdocs-material = ">=9.1.16"
55-
mike = ">=2.0.0"
56-
mypy = ">=0.990"
57-
pymdown-extensions = ">=10.0.1"
58-
pytest = "^8.0.0"
59-
pytest-asyncio = ">=0.20.3"
60-
pytest-cov = ">=4.0.0"
61-
pytest-factoryboy = ">=2.5.0"
62-
pytest-xdist = ">=3.0.2"
63-
ruff = ">=0.0.263"
64-
tox = ">=4.12.1"
64+
[tool.hatch.version]
65+
source = "uv-dynamic-versioning"
6566

66-
############################
67-
### Tools configuration ###
68-
############################
67+
[tool.hatch.build.hooks.version]
68+
path = "bootstrap_python_package/version.py"
6969

7070
[tool.coverage.run]
7171
branch = true
7272
source = ["bootstrap_python_package"]
73-
# It's not necessary to configure concurrency here
74-
# because pytest-cov takes care of that
73+
omit = [
74+
"bootstrap_python_package/version.py",
75+
]
7576

7677
[tool.coverage.report]
7778
fail_under = 100

0 commit comments

Comments
 (0)