File: rules

package info (click to toggle)
python-fisx 1.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 21,888 kB
  • sloc: cpp: 9,333; python: 1,339; sh: 144; makefile: 41
file content (39 lines) | stat: -rw-r--r-- 1,018 bytes parent folder | download | duplicates (8)
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
#!/usr/bin/make -f

export DH_VERBOSE=1
export PYBUILD_VERBOSE=1

export WITH_CYTHON=1
export FISX_DATA_DIR=/usr/share/fisx/
export PKGCOMMON=$(CURDIR)/debian/python-fisx-common/

export PYBUILD_NAME=fisx
export PYBUILD_AFTER_INSTALL=rm -rf {destdir}$(FISX_DATA_DIR)

# Make does not offer a recursive wildcard function, so here's one:
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))

# How to recursively find all files with the same name in a given folder
ALL_PYX := $(call rwildcard,python/,*.pyx)
#NOTA: No space before *

override_dh_clean:
	dh_clean
	rm -rf python/fisx.egg-info/
	rm -f $(patsubst %.pyx,%.cpp,${ALL_PYX})
	rm -f $(patsubst %.pyx,%.c,${ALL_PYX})

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

override_dh_auto_install:
	dh_auto_install
	dh_numpy
	dh_numpy3

	# install the common files
	python setup.py install_data --root $(PKGCOMMON)
	rm -f $(PKGCOMMON)/$(FISX_DATA_DIR)/LICENSE

override_dh_auto_test:
	FISX_DATA_DIR=$(CURDIR)/fisx_data dh_auto_test