File: rules

package info (click to toggle)
nose 1.3.7-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,680 kB
  • ctags: 3,035
  • sloc: python: 15,697; makefile: 119; xml: 42; sh: 15
file content (60 lines) | stat: -rwxr-xr-x 1,676 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

# Get our python versions
PYVERS  := $(shell pyversions -r)
PY3VERS := $(shell py3versions -r)
DESTDIR2 := $(CURDIR)/debian/python-nose
DESTDIR3 := $(CURDIR)/debian/python3-nose

# Send HTTP traffic to “discard” service
export http_proxy = http://127.0.1.1:9/
export https_proxy = ${http_proxy}

%:
	dh $@ --with python2,python3,sphinxdoc

override_dh_auto_build:
	set -ex; \
	for py in $(PYVERS) $(PY3VERS); do \
		$$py setup.py build; \
	done
	python setup.py build_sphinx

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	set -ex; \
	for py in $(PYVERS); do \
		$$py setup.py test; \
	done
	for py in $(PY3VERS); do \
		$$py setup.py build_tests; \
		$$py selftest.py -v; \
	done
endif

override_dh_auto_clean:
	rm -rf build unit_tests/support/doctest/noname_wrapped.not_pyc
	dh_auto_clean

override_dh_auto_install:
	set -ex; \
	for py in $(PYVERS); do \
		rm -rf nose.egg-info; \
		$$py setup.py install --skip-build --root debian/python-nose \
		                      --install-layout deb; \
	done
	sed -i -e 's,#!/usr/bin/python.*,#!/usr/bin/python,' $(DESTDIR2)/usr/bin/nosetests
	set -ex; \
	for py in $(PY3VERS); do \
		rm -rf nose.egg-info; \
		$$py setup.py install --skip-build --root debian/python3-nose \
		                      --install-layout deb; \
	done
	cd $(DESTDIR3)/usr/bin/ && mv nosetests nosetests3
	rm -f $(DESTDIR3)/usr/bin/nosetests-3.*
	sed -i -e 's,#!/usr/bin/python3.*,#!/usr/bin/python3,' $(DESTDIR3)/usr/bin/nosetests3

override_dh_installman:
	dh_installman -p python-nose nosetests.1
	dh_installman -p python3-nose nosetests.1
	cd $(DESTDIR3)/usr/share/man/man1 && mv nosetests.1 nosetests3.1