File: rules

package info (click to toggle)
rpy2 3.6.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,412 kB
  • sloc: python: 18,448; ansic: 492; makefile: 197; sh: 166
file content (41 lines) | stat: -rwxr-xr-x 1,315 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
35
36
37
38
39
40
41
#!/usr/bin/make -f
# debian/rules file for the Debian GNU/Linux python-rpy2 package
# Copyright 2004 - 2023 by Dirk Eddelbuettel <edd@debian.org>

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

build3vers      := $(shell py3versions -sv)

version         := $(shell head -1 debian/changelog | perl -nle 'm/\((.*)-\d\)/ && print $$1')

showversion:
	@echo "Version is ${version}"

tarball:
	(cd .. && \
		tar czf ../$(project)_${version}.orig.tar.gz ./$(project) \
			--exclude=.svn --exclude=debian/ --exclude=.hg)

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

# remove the wheel file after each build, as pybuild built_wheel() fails if it finds more than one
override_dh_auto_build:
	PYBUILD_DIR=rpy2-rinterface dh_auto_build
	rm -fv .pybuild/*/*.whl
	PYBUILD_DIR=rpy2-robjects dh_auto_build
	rm -fv .pybuild/*/*.whl
	dh_auto_build

# we set TZ because some tests fail in GMT+/-X timezones (e.g. reprotest default)
# and language because some tests check R error messages and expect the English version
override_dh_auto_test:
	TZ=America/New_York LC_ALL=C.UTF-8 LANGUAGE=C.UTF-8 dh_auto_test
	find -type f -name Rplots.pdf -delete

override_dh_installdocs:
	dh_installdocs -a NEWS

execute_after_dh_auto_clean:
	rm -rfv .pybuild build */build src/*.egg-info */src/*.egg-info
	find . -name __pycache__ | rm -rfv