#!/usr/bin/make -f

DEB_DH_BUILDDEB_ARGS = -- -Z xz

include /usr/share/cdbs/1/class/python-distutils.mk
include /usr/share/cdbs/1/rules/debhelper.mk

export DEB_HOST_MULTIARCH

versions :=  $(shell pyversions -vs)

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
build/python-m2crypto::
	for version in $(versions); \
		do python$$version setup.py test || exit 1; \
	done
endif

clean::
	rm -f M2Crypto/__m2crypto.so SWIG/_m2crypto.py SWIG/_m2crypto_wrap.c tests/randpool.dat tests/sig.p7 tests/sig.p7s
