-
Notifications
You must be signed in to change notification settings - Fork 98
/
Makefile
44 lines (34 loc) · 1.01 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
include Rules.mk
TARGETS := version install uninstall clean dist windist mypy
.PHONY: $(TARGETS)
PROJ = greaseweazle
VER := $(shell $(PYTHON) -c \
"from setuptools_scm import get_version ; print(get_version())")
version:
@echo $(VER)
install:
$(PYTHON) -m pip install .
uninstall:
$(PYTHON) -m pip uninstall $(PROJ)
clean:
rm -rf build dist .mypy_cache src/greaseweazle/__init__.py
rm -rf src/*.egg-info src/greaseweazle/optimised/*.so
rm -rf $(PROJ)-*
find . -name __pycache__ | xargs rm -rf
dist:
rm -rf $(PROJ)-*
$(PYTHON) setup.py sdist --formats=zip -d .
windist: install
rm -rf $(PROJ)-*
mkdir -p $(PROJ)-$(VER)
cp -a COPYING $(PROJ)-$(VER)/
cp -a README $(PROJ)-$(VER)/
cp -a RELEASE_NOTES $(PROJ)-$(VER)/
echo $(VER) >$(PROJ)-$(VER)/VERSION
cd scripts/win && $(PYTHON) setup.py build
cp -a scripts/win/build/exe.win*/* $(PROJ)-$(VER)/
# mypy testing
src/greaseweazle/__init__.py:
echo "__version__: str" >$@
mypy: src/greaseweazle/__init__.py
$(PYTHON) -m mypy --config-file=scripts/tests/mypy.ini