File: rules

package info (click to toggle)
tqdm 4.11.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 528 kB
  • ctags: 397
  • sloc: python: 3,462; makefile: 115
file content (39 lines) | stat: -rwxr-xr-x 1,541 bytes parent folder | download
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
#!/usr/bin/make -f

LIB2 := $(shell python  -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print(b.build_purelib)")
LIB3 := $(shell python3 -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print(b.build_purelib)")

%:
	dh $@ --with python2,python3

override_dh_auto_build:
	python  setup.py build
	python3 setup.py build

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	# tests/ dir is not copied, so we do that, else we cant run the tests in the build dir
	cp -r $(CURDIR)/tqdm/tests/ $(CURDIR)/$(LIB2)/tqdm/
	# run perf tests in a separate, non-failing, line
	nosetests -Itests_perf.py $(LIB2)/tqdm/
	-nosetests $(LIB2)/tqdm/tests/tests_perf.py
	rm -rf $(CURDIR)/$(LIB2)/tqdm/tests/

	cp -r $(CURDIR)/tqdm/tests/ $(CURDIR)/$(LIB3)/tqdm/
	# run perf tests in a separate, non-failing, line
	nosetests3 -Itests_perf.py $(LIB3)/tqdm/
	-nosetests3 $(LIB3)/tqdm/tests/tests_perf.py
	rm -rf $(CURDIR)/$(LIB3)/tqdm/tests/
endif

override_dh_auto_install:
	python  setup.py install --root=debian/python-tqdm  --install-layout=deb
	# cli tools are provided only by the py3k package
	rm -rf $(CURDIR)/debian/python-tqdm/usr/bin
	python3 setup.py install --root=debian/python3-tqdm --install-layout=deb

override_dh_installdocs:
	dh_installdocs -A CONTRIBUTING.md README.rst

override_dh_installexamples:
	dh_installexamples -A examples/*.py