-
Notifications
You must be signed in to change notification settings - Fork 60
/
Makefile
67 lines (55 loc) · 1.45 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
# PyPi Packaging
package: clean
@echo " ** PACKAGING FOR PYPI **"
python setup.py sdist bdist_wheel
python3 setup.py bdist_wheel
# PyPi Packaging
package3: package
@echo " ** PACKAGING FOR PYPI **"
python3 setup.py bdist_wheel
# PyPi Publishing
publish: package package3
@echo " ** UPLOADING TO PYPI **"
twine upload dist/*
# Clean all the things
clean:
@echo " ** CLEANING CHIP_IO **"
rm -rf CHIP_IO.* build dist
rm -f *.pyo *.pyc
rm -f *.egg
rm -rf __pycache__
rm -rf test/__pycache__/
rm -rf debian/python-chip-io*
rm -rf debian/python3-chip-io*
# Run all the tests
tests: pytest2 pytest3
# Run the tests with Python 2
pytest2:
@echo " ** RUNING CHIP_IO TESTS UNDER PYTHON 2 **"
pushd test; python -m pytest; popd
# Run the tests with Python 3
pytest3:
@echo " ** RUNING CHIP_IO TESTS UNDER PYTHON 3 **"
pushd test; python3 -m pytest; popd
# Build all the things
build:
@echo " ** BUILDING CHIP_IO: PYTHON 2 **"
python setup.py build --force
# Install all the things
install: build
@echo " ** INSTALLING CHIP_IO: PYTHON 2 **"
python setup.py install --force
# Build for Python 3
build3:
@echo " ** BUILDING CHIP_IO: PYTHON 3 **"
python3 setup.py build --force
# Install for Python 3
install3: build3
@echo " ** INSTALLING CHIP_IO: PYTHON 3 **"
python3 setup.py install --force
# Install for both Python 2 and 3
all: install install3
# Create a deb file
debfile:
@echo " ** BUILDING DEBIAN PACKAGES **"
dpkg-buildpackage -rfakeroot -uc -b