File: rules

package info (click to toggle)
python-fann2 1%3A1.1.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 520 kB
  • sloc: cpp: 1,615; ansic: 862; python: 116; makefile: 28; sh: 24
file content (49 lines) | stat: -rwxr-xr-x 1,099 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
42
43
44
45
46
47
48
49
#!/usr/bin/make -f
# -*- makefile -*-
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

export PYBUILD_NAME=fann2


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


override_dh_auto_test:
	mkdir -p test
	
	PYBUILD_SYSTEM=custom \
	PYBUILD_TEST_ARGS="\
		AUTOPKGTEST_TMP={dir}/test \
		PYTHONPATH={build_dir} \
		PYINTERPRETER={interpreter} \
		/bin/sh $(CURDIR)/debian/tests/python{version.major}-basic" \
	dh_auto_test


override_dh_auto_install:
	dh_auto_install
	
	# Package python-pyfann provides the "fann2" module under the
	# former name "pyfann". It is sufficient to symlink the latter
	# to the former.
	PYBUILD_DISABLE_python3=1 \
	PYBUILD_NAME=pyfann \
	PYBUILD_SYSTEM=custom \
	PYBUILD_BEFORE_INSTALL="mkdir -p debian/{package}/{install_dir}" \
	PYBUILD_INSTALL_ARGS="cd debian/{package}/{install_dir} && ln -s fann2 pyfann" \
	dh_auto_install


override_dh_auto_clean:
	dh_auto_clean
	
	rm -rf fann2.egg-info
	rm -rf build
	rm -rf test
	rm -f fann2/fann2_wrap.cxx fann2/fann2_wrap.cpp
	rm -f fann2/libfann.py