-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (32 loc) · 830 Bytes
/
Makefile
File metadata and controls
38 lines (32 loc) · 830 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
37
38
REFORMAT_DIRS:=upnpfuzz
define colorecho
@tput setaf 6
@echo $1
@tput sgr0
endef
.PHONY: package
package: clean
$(call colorecho, "\n Building package distributions...")
python setup.py install
python setup.py bdist_wheel
.PHONY: line
lint:
$(call colorecho, "\nLinting...")
isort --check-only --diff $(REFORMAT_DIRS)
ruff check --diff $(REFORMAT_DIRS)
.PHONY: reformat
reformat:
$(call colorecho, "\nReformatting...")
isort $(REFORMAT_DIRS)
ruff check --fix $(REFORMAT_DIRS)
.PHONY: clean
clean:
$(call colorecho, "\nRemoving artifacts...")
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
rm -rf build dist pip-wheel-metadata
.PHONY: publish
publish: package
$(call colorecho, "\nPublishing...")
twine upload dist/* --verbose