forked from yaqwsx/PcbDraw
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
56 lines (42 loc) · 1.34 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
#!/usr/bin/make
.PHONY: package release deb deb_clean test test-system test-unit mypy
all: package
package:
rm -f dist/*
python3 setup.py sdist bdist_wheel
install: package
pip3 install --no-deps --force dist/*.whl
release: package
twine upload dist/*
test: test-system test-unit mypy
build/test:
mkdir -p $@
test-system: build/test $(shell find pcbdraw -type f)
cd build/test && bats ../../test/system
test-unit:
cd test/units && pytest
mypy:
cd pcbdraw && python3 -m mypy .
clean:
-rm -rf dist build
-rm -rf PcbDraw.egg-info
deb:
# Make sure we don't include the downloaded example
make clean
@-[ ! -f versioneer.py.ok ] && mv versioneer.py versioneer.py.ok
@-[ ! -f pcbdraw/_version.py.ok ] && mv pcbdraw/_version.py pcbdraw/_version.py.ok
cp debian/versioneer.py .
DEB_BUILD_OPTIONS=nocheck fakeroot dpkg-buildpackage -uc -b
mv versioneer.py.ok versioneer.py
mv pcbdraw/_version.py.ok pcbdraw/_version.py
deb_sig:
# Make sure we don't include the downloaded example
make clean
@-[ ! -f versioneer.py.ok ] && mv versioneer.py versioneer.py.ok
@-[ ! -f pcbdraw/_version.py.ok ] && mv pcbdraw/_version.py pcbdraw/_version.py.ok
cp debian/versioneer.py .
DEB_BUILD_OPTIONS=nocheck fakeroot dpkg-buildpackage -b
mv versioneer.py.ok versioneer.py
mv pcbdraw/_version.py.ok pcbdraw/_version.py
deb_clean:
fakeroot debian/rules clean