Files
palladum-lightning/contrib/pyln-client/Makefile
Lakshya Singh 89eaf5b517 feat: replace poetry with uv in Makefiles
Extract package versions from pyproject.toml directly
instead of using poetry commands. Use `uv run` to execute flake8,
pytest and other Python tools consistently.

Add new make commands for uv builds
2025-08-11 11:06:22 +09:30

37 lines
903 B
Makefile

#!/usr/bin/make
PKG=client
VERSION := $(shell grep 'version' pyproject.toml | head -n1 | cut -d'"' -f2)
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = docs
BUILDDIR = build
SDIST_FILE = "dist/pyln-${PKG}-$(VERSION).tar.gz"
BDIST_FILE = "dist/pyln_${PKG}-$(VERSION)-py3-none-any.whl"
ARTEFACTS = $(BDIST_FILE) $(SDIST_FILE)
check: check-source check-pytest
check-source: check-flake8 check-mypy check-version
check-version:
[ "`uv run python3 -c 'from pyln import $(PKG); print($(PKG).__version__)'`" = "$(VERSION)" ] || exit 1
check-flake8:
uv run flake8 --ignore=E501,E731,W503,E741 pyln tests
check-pytest:
uv run pytest tests
check-mypy:
# MYPYPATH=$(PYTHONPATH) mypy --namespace-packages --follow-imports=skip tests pyln
$(SDIST_FILE) $(BDIST_FILE):
uv build
prod-release: check-version $(ARTEFACTS)
uv publish