File: rules

package info (click to toggle)
q2-cutadapt 2024.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,588 kB
  • sloc: python: 3,519; makefile: 33; sh: 13
file content (34 lines) | stat: -rwxr-xr-x 1,543 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

# DH_VERBOSE := 1
export LC_ALL=C.UTF-8

include /usr/share/dpkg/default.mk
VERSION_UPSTREAM=$(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\(20[0-9][0-9]\.[0-9]\+\)\..*/\1/')

# For testing, we need to deploy the project in the build directory
# so that qiime2 plugins are loaded
export PYBUILD_BEFORE_TEST=python{version} setup.py develop --install-dir {build_dir}
# Un-deploy the project
export PYBUILD_AFTER_TEST=rm -v {build_dir}/site.py {build_dir}/.coverage*; \
	python{version} setup.py develop --uninstall --install-dir {build_dir}

%:
	dh $@ --buildsystem=pybuild

debian/control: debian/control.in
	echo "# This file is autogenerated from control.in to update versioned dependencies" > $@
	sed -e"s/@DEB_VERSION_UPSTREAM@/$(VERSION_UPSTREAM)/g" $< >> $@

# FIXME: similarly to the qiime and q2-types packages, the build time testing fails, as
#        the Qiime plugin system is not fully available at this point of the package
#        construction.  The test suite is only run at autopkgtest time, but this
#        is not ideal, since the only tested python version is the default one.
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
#	dh_auto_test -- -s custom --test-args="cd {build_dir}; py.test-3 --cov=q2_cutadapt"
endif

override_dh_auto_clean:
	dh_auto_clean
	rm -f q2_cutadapt.egg-info/PKG-INFO q2_cutadapt.egg-info/SOURCES.txt q2_cutadapt.egg-info/dependency_links.txt q2_cutadapt.egg-info/entry_points.txt q2_cutadapt.egg-info/not-zip-safe q2_cutadapt.egg-info/top_level.txt