-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
51 lines (41 loc) · 1.46 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
PACKAGE = mythtv_services_api
SOURCES = \
setup.py \
setup.cfg \
unittests.py \
$(PACKAGE)/send.py \
$(PACKAGE)/utilities.py \
$(PACKAGE)/__init__.py \
$(PACKAGE)/_version.py
usage:
@echo "\nUse: make <target> VERSION=M.m.f, e.g. make install VERSION=0.1.9\n"
@echo "This package is now a part of MythTV version 30.0\n"
install: unittests uninstall
@echo "Installing VERSION: $(VERSION)"
@python2 setup.py bdist_wheel
@sudo --set-home pip2 install dist/$(PACKAGE)-$(VERSION)-py2-none-any.whl
@python3 setup.py bdist_wheel
@sudo --set-home pip3 install dist/$(PACKAGE)-$(VERSION)-py3-none-any.whl
push: version unittests
@echo "Pushing VERSION: $(VERSION)"
@git add dist/$(PACKAGE)-$(VERSION)-py?-none-any.whl
@git commit --message "Latest .whls for: $(VERSION)." \
dist/$(PACKAGE)-$(VERSION)-py?-none-any.whl
@git tag --annotate $(VERSION) --message "Tag generated by: make push"
@git push
clean:
@rm --force $(PACKAGE)/*.pyc
@rm --recursive --force $(PACKAGE)/__pycache__
@rm --recursive --force $(PACKAGE).egg-info
@rm --recursive --force build/*
clobber: version clean
@echo "Clobbering VERSION: $(VERSION)"
@git rm --force --ignore-unmatch dist/$(PACKAGE)-$(VERSION)-py?-none-any.whl
unittests:
@./unittests.py
uninstall: clobber
@sudo --set-home pip2 uninstall --yes $(PACKAGE) || :
@sudo --set-home pip3 uninstall --yes $(PACKAGE) || :
version:
@test -n "$(VERSION)" || (echo "\nVERSION wasn't set!\n" && exit 1)
# vim: set colorcolumn=80 noexpandtab: