forked from blair/ubuntu-precise-python-defaults
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (51 loc) · 2.1 KB
/
Makefile
File metadata and controls
65 lines (51 loc) · 2.1 KB
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
#!/usr/bin/make -f
INSTALL ?= install
PREFIX ?= /usr/local
MANPAGES ?= dh_python2.1 pycompile.1 pyclean.1
clean:
make -C tests clean
make -C pydist clean
find . -name '*.py[co]' -delete
rm -f .coverage $(MANPAGES)
install-dev:
$(INSTALL) -m 755 -d $(DESTDIR)$(PREFIX)/bin \
$(DESTDIR)$(PREFIX)/share/python/runtime.d \
$(DESTDIR)$(PREFIX)/share/debhelper/autoscripts/ \
$(DESTDIR)$(PREFIX)/share/perl5/Debian/Debhelper/Sequence/
$(INSTALL) -m 755 runtime.d/* $(DESTDIR)$(PREFIX)/share/python/runtime.d/
$(INSTALL) -m 644 autoscripts/* $(DESTDIR)$(PREFIX)/share/debhelper/autoscripts/
$(INSTALL) -m 755 dh_python2 $(DESTDIR)$(PREFIX)/bin/
$(INSTALL) -m 644 python2.pm $(DESTDIR)$(PREFIX)/share/perl5/Debian/Debhelper/Sequence/
install-runtime:
$(INSTALL) -m 755 -d $(DESTDIR)$(PREFIX)/share/python/debpython $(DESTDIR)$(PREFIX)/bin
$(INSTALL) -m 644 debpython/*.py $(DESTDIR)$(PREFIX)/share/python/debpython/
$(INSTALL) -m 755 pycompile $(DESTDIR)$(PREFIX)/bin/
$(INSTALL) -m 755 pyclean $(DESTDIR)$(PREFIX)/bin/
install: install-dev install-runtime
%.1: %.rst
rst2man $< > $@
manpages: $(MANPAGES)
dist_fallback:
make -C pydist $@
check_versions:
@set -ex;\
DEFAULT=`sed -rn 's,^DEFAULT = \(([0-9]+)\, ([0-9]+)\),\1.\2,p' debpython/version.py`;\
SUPPORTED=`sed -rn 's,^SUPPORTED = \[\(([0-9]+)\, ([0-9]+)\)\, \(([0-9]+)\, ([0-9]+)\)\],\1.\2 \3.\4,p' debpython/version.py`;\
DEB_DEFAULT=`sed -rn 's,^default-version = python([0-9.]*),\1,p' debian/debian_defaults`;\
DEB_SUPPORTED=`sed -rn 's|^supported-versions = (.*)|\1|p' debian/debian_defaults | sed 's/python//g;s/,//g'`;\
[ "$$DEFAULT" = "$$DEB_DEFAULT" ] || \
(echo "Please update DEFAULT in debpython/version.py ($$DEFAULT vs. $$DEB_DEFAULT)" >/dev/stderr; false);\
[ "$$SUPPORTED" = "$$DEB_SUPPORTED" ] || \
(echo "Please update SUPPORTED in debpython/version.py ($$SUPPORTED vs. $$DEB_SUPPORTED)" >/dev/stderr; false)
pdebuild:
pdebuild --debbuildopts -I
# TESTS
nose:
nosetests --with-doctest --with-coverage
unittests:
python2.7 -m unittest discover -v
tests: nose
make -C tests
test%:
make -C tests $@
.PHONY: clean tests test% check_versions