66.DEFAULT_GOAL := help
77default : help
88
9- ifeq ("","$(shell command -v zsh) ")
10- $(error "zsh not found; you must install zsh first")
11- endif
12- SHELL: =zsh -eu -o pipefail -o null_glob
13-
149COLOR_RESET =\033[0m
1510COLOR_CYAN_BOLD =\033[1;36m
1611define INFO_MESSAGE
2217
2318.PHONY : help
2419help : # # Display help message
25- @uvx python -c " import re; \
26- [[print(f' ✦ \033[36m{m[0]:<20}\033[0m {m[1]}' ) for m in re.findall(r' ^([\sa-zA-Z_-]+):.*?## (.*)$$' , open(makefile).read (), re.M)] for makefile in (' $(MAKEFILE_LIST)' ).strip().split()]" | sort
20+ @./sbin/makefile-extract-documentation ${MAKEFILE_LIST}
2721
2822# ###########################################################################
2923# = SETUP, INSTALLATION, PACKAGING
@@ -42,6 +36,12 @@ build: ## Build package
4236 rm -fr dist
4337 uv build
4438
39+ .PHONY : publish
40+ publish : build # # publish package to PyPI
41+ $(call INFO_MESSAGE, "Publishing package")
42+ uv publish # Requires UV_PUBLISH_TOKEN or Trusted Publishing setup
43+
44+
4545# ###########################################################################
4646# = FORMATTING, TESTING, AND CODE QUALITY
4747
@@ -78,14 +78,15 @@ docs-test: ## Test if documentation can be built without warnings or errors
7878.PHONY : clean
7979clean : # # Remove temporary and backup files
8080 $(call INFO_MESSAGE, "Remove temporary and backup files")
81- rm -frv ** / * ~ ** / * .bak
81+ find . \( -name " *~ " -o -name " * .bak" \) -exec rm -frv {} +
8282
8383.PHONY : cleaner
8484cleaner : clean # # Remove files and directories that are easily rebuilt
8585 $(call INFO_MESSAGE, "Remove files and directories that are easily rebuilt")
8686 rm -frv .cache .DS_Store .pytest_cache .ruff_cache build coverage.xml dist docs/_build site
87- rm -frv ** /* .pyc ** /__pycache__ ** /* .egg-info
88- rm -frv ** /* .orig ** /* .rej
87+ find . \( -name __pycache__ -type d \) -exec rm -frv {} +
88+ find . \( -name " *.pyc" -o -name " *.egg-info" \) -exec rm -frv {} +
89+ find . \( -name " *.orig" -o -name " *.rej" \) -exec rm -frv {} +
8990
9091.PHONY : cleanest
9192cleanest : cleaner # # Remove all files that can be rebuilt
0 commit comments