File: rules

package info (click to toggle)
python-qcli 0.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 100 kB
  • ctags: 98
  • sloc: python: 646; makefile: 22
file content (33 lines) | stat: -rwxr-xr-x 903 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
#!/usr/bin/make -f

DH_VERBOSE := 1

pkg      := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
bindir   := $(CURDIR)/debian/$(pkg)/usr/bin
examples := $(CURDIR)/debian/$(pkg)/usr/share/doc/$(pkg)/examples

pybuilddir := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)-$(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)

export PYBUILD_NAME=qcli


%:
	dh $@ --with python2 --buildsystem=pybuild

# we only need this package as qiime dependency - there is no point in bloating /usr/bin with these scripts
override_dh_installexamples:
	mv $(bindir) $(examples)

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	set -e -x;\
	for pyv in `pyversions -dv` ; do \
	    cd build/; \
	    ln -s ../python-code/tests; \
	    env PYTHONPATH=lib.$(pybuilddir)-$${pyv} nosetests ; \
	done
endif

get-orig-source:
	mkdir -p ../tarballs
	uscan --verbose --force-download --destdir=../tarballs