11[project ]
22name = " brew-python-resources"
3- version = " 0.0.1"
43description = " Generate and Update Homebrew Formula (Brew) Python Resources."
54readme = " README.md"
65requires-python = " >=3.8"
@@ -19,11 +18,13 @@ dependencies = [
1918 " requests>=2.32.4" ,
2019 " requests-cache>=1.2.1" ,
2120]
21+ dynamic = [" version" ]
2222
2323[project .urls ]
2424Changelog = " https://github.com/cssnr/brew-python-resources/releases"
2525Discord = " https://discord.gg/wXy6m2X8wY"
2626Documentation = " https://cssnr.github.io/brew-python-resources/"
27+ Download = " https://github.com/cssnr/brew-python-resources/releases/latest"
2728Funding = " https://ko-fi.com/cssnr"
2829GitHub = " https://github.com/cssnr/brew-python-resources"
2930Homepage = " https://cssnr.com/"
@@ -38,6 +39,7 @@ dev = [
3839 " bandit>=1.7.10" ,
3940 " black>=24.8.0" ,
4041 " coverage>=7.6.1" ,
42+ " hatch>=1.14.2" ,
4143 " isort>=5.13.2" ,
4244 " mypy>=1.14.1" ,
4345 " pyinstaller>=6.17.0" ,
@@ -51,10 +53,10 @@ dev = [
5153 " yamllint>=1.35.1" ,
5254]
5355
54- # https://docs.astral.sh/uv/reference/settings /#build-backend
56+ # https://hatch.pypa.io/latest/config/build /#build-system
5557[build-system ]
56- requires = [" uv_build>=0.9.9,<0.10.0 " ]
57- build-backend = " uv_build "
58+ requires = [" hatchling " ]
59+ build-backend = " hatchling.build "
5860
5961# Bandit
6062# https://bandit.readthedocs.io/en/latest/config.html
@@ -72,9 +74,20 @@ extend-exclude = '(\.github)'
7274# Coverage
7375# https://coverage.readthedocs.io/en/latest/
7476[tool .coverage .run ]
75- omit = [" _version.py" , " utils.py" ]
77+ omit = [" _version.py" , " app.py " , " utils.py" ]
7678source = [" src" ]
7779
80+ # Hatchling
81+ # https://hatch.pypa.io/latest/config/build/#build-system
82+ [tool .hatch .version ]
83+ path = " src/brewresources/_version.py"
84+
85+ [tool .hatch .build .targets .sdist ]
86+ include = [" src" ]
87+
88+ [tool .hatch .build .targets .wheel ]
89+ packages = [" src/brewresources" ]
90+
7891# Isort
7992# https://pycqa.github.io/isort/docs/configuration/options.html
8093[tool .isort ]
@@ -105,7 +118,8 @@ select = ["E4", "E7", "E9", "F", "B", "Q"]
105118win-version = " uv run pyivf-make_version --source-format yaml --metadata-source .github/files/win-version.yaml --outfile win-version.txt"
106119pyinstaller = " uv run pyinstaller -F -n bpr -i docs/favicon.ico src/app.py"
107120test = [" uv run coverage run -m pytest" , " uv run coverage report -m" ]
108- build = " uv build"
121+ clean = " rm -rf dist"
122+ build = " uv run hatch build"
109123predocs = " rm -rf .cache site"
110124docs = " zensical serve --open --dev-addr 0.0.0.0:8000"
111125docs-build = " zensical build --clean"
@@ -114,15 +128,15 @@ uv run black .
114128uv run isort -c .
115129uv run ruff format
116130uv run tombi format .
117- which prettier && prettier --write .
131+ which prettier && prettier --write . || echo missing prettier
118132"""
119133lint = """
120134run bandit
121135run mypy
122136run ruff
123137run validate
124138run yamllint
125- which prettier && prettier --check .
139+ which prettier && prettier --check . || echo missing prettier
126140uv run black --check .
127141uv run isort -c .
128142uv run tombi lint .
@@ -134,7 +148,3 @@ mypy = "uv run mypy ."
134148ruff = " uv run ruff check ."
135149validate = " uv run validate-pyproject pyproject.toml"
136150yamllint = " uv run yamllint -c .github/yamllint.yaml ."
137-
138- [tool .uv .build-backend ]
139- module-name = " brewresources"
140- source-include = [" LICENSE" ]
0 commit comments