File: rules

package info (click to toggle)
python-requests-cache 0.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 376 kB
  • sloc: python: 1,610; makefile: 140
file content (34 lines) | stat: -rwxr-xr-x 1,252 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
#!/usr/bin/make -f

export PYBUILD_DISABLE=test

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 python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build
	$(MAKE) -C docs html

override_dh_auto_install:
	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