-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
73 lines (49 loc) · 1.51 KB
/
Makefile
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# qgis server makefile
#
DEPTH=.
include $(DEPTH)/config.mk
DIST:=dist
MANIFEST=pyqgisserver/build.manifest
PYTHON_PKG=pyqgisserver pyqgisservercontrib
TESTDIR=tests/unittests
PYPISERVER:=storage
# This is necessary with pytest as long it is not fixed
# see also https://github.com/qgis/QGIS/pull/5337
export QGIS_DISABLE_MESSAGE_HOOKS := 1
export QGIS_NO_OVERRIDE_IMPORT := 1
dirs:
mkdir -p $(DIST)
version:
echo $(VERSION_TAG) > VERSION
configure: manifest
manifest: version
echo name=$(PROJECT_NAME) > $(MANIFEST) && \
echo version=$(VERSION_TAG) >> $(MANIFEST) && \
echo buildid=$(BUILDID) >> $(MANIFEST) && \
echo commitid=$(COMMITID) >> $(MANIFEST)
@echo "=== Written manifest ==="
@cat $(MANIFEST)
deliver:
twine upload $(TWINE_OPTIONS) -r $(PYPISERVER) $(DIST)/*
dist: dirs configure
rm -rf *.egg-info
$(PYTHON) -m build --no-isolation --sdist --outdir=$(DIST)
clean:
rm -rf $(DIST)
test: manifest lint
make -C tests test PYTEST_ADDOPTS=$(PYTEST_ADDOPTS)
install: manifest
pip install -U --upgrade-strategy=eager -e .
install-tests:
pip install -U --upgrade-strategy=eager -r tests/requirements.txt
install-doc:
pip install -U --upgrade-strategy=eager -r doc/requirements.txt
install-dev: install-tests install-doc
lint:
@ruff check --output-format=concise $(PYTHON_PKG) $(TESTDIR)
lint-preview:
@ruff check --preview $(PYTHON_PKG) $(TESTDIR)
lint-fix:
@ruff check --preview --fix $(PYTHON_PKG) $(TESTDIR)
typing:
mypy --config-file=$(topsrcdir)/mypy.ini -p pyqgisserver -p pyqgisservercontrib