-
Notifications
You must be signed in to change notification settings - Fork 990
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (25 loc) · 903 Bytes
/
Makefile
File metadata and controls
36 lines (25 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/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