File: rules

package info (click to toggle)
python-pkginfo 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 464 kB
  • ctags: 431
  • sloc: python: 1,831; makefile: 72
file content (19 lines) | stat: -rwxr-xr-x 710 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/make -f
export PYBUILD_NAME=pkginfo
# Let's ship pkginfo executable only in the python3 version of the package
export PYBUILD_AFTER_INSTALL_python2=rm -f {destdir}/usr/bin/pkginfo && find {destdir} -type d -empty -delete && rm -rf '{destdir}/{install_dir}/pkginfo/tests'
export PYBUILD_AFTER_INSTALL_python3=rm -rf '{destdir}/{install_dir}/pkginfo/tests'

%:
	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build --buildsystem=pybuild
	python3 setup.py build_sphinx

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	set -e -x; \
	cd $(CURDIR)/pkginfo/tests/sneaky ; python setup.py egg_info ; cd ../../..
	dh_auto_test
endif