File: rules

package info (click to toggle)
python-requests-cache 0.4.13-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 348 kB
  • ctags: 377
  • sloc: python: 1,359; makefile: 141
file content (34 lines) | stat: -rwxr-xr-x 1,482 bytes parent folder | download | duplicates (2)
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
#!/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,sphinxdoc

override_dh_auto_build:
	dh_auto_build
	$(MAKE) -C docs html

override_dh_auto_install:
	python setup.py install --root=debian/python-requests-cache --install-layout=deb
	python3 setup.py install --root=debian/python3-requests-cache --install-layout=deb

#override_dh_auto_test:
#ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
#	# we can't use unittest discover -s tests as tests for redis/mongo are
#	# trying to use the system-installed redis/mongo instance, which is unsafe
#	sleep 10
#	PYTHONPATH=$$LIB2:tests python  -m unittest -v test_cache test_custom_dict test_dbdict test_monkey_patch test_thread_safety	
#	PYTHONPATH=$$LIB3:tests python3 -m unittest -v test_cache test_custom_dict test_dbdict test_monkey_patch test_thread_safety	
#endif

override_dh_installexamples:
	dh_installexamples -ppython-requests-cache-doc example.py sandbox.py

override_dh_installdocs:
	dh_installdocs -ppython-requests-cache-doc docs/_build/html
	dh_installdocs -A README.rst

override_dh_installchangelogs:
	dh_installchangelogs -A HISTORY.rst