File: rules

package info (click to toggle)
chemfp 1.1p1-2.1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 2,456 kB
  • sloc: python: 15,317; ansic: 10,450; makefile: 126
file content (29 lines) | stat: -rwxr-xr-x 840 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
#!/usr/bin/make -f

#export DH_VERBOSE=1

GCC_SSSE3_ARCH  = amd64 i386 kfreebsd-i386 kfreebsd-amd64 hurd-i386 x32
DEB_HOST_ARCH  ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)


-include /usr/share/python/python.mk

PYVERS := $(shell pyversions -sv)

export CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
export CFLAGS   := $(shell dpkg-buildflags --get CFLAGS)
export LDFLAGS  := $(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed

%:
	dh $@ --with python2 --parallel

ifeq (,$(findstring $(DEB_HOST_ARCH),$(GCC_SSSE3_ARCH)))
override_dh_auto_build:
	dh_auto_build -- --without-ssse3
endif

override_dh_auto_test:
	-for PY in $(PYVERS); do \
	  py_path="$(CURDIR)/build/lib.`python$${PY} -c 'from distutils import util; print util.get_platform();'`-$$PY/" ; \
	  (cd tests; PYTHONPATH=$$py_path python$$PY unit2 discover); \
	done