#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow
export PYBUILD_NAME = memory_allocator

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

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	python3 setup.py build_ext --inplace
	python3 test.py
endif

override_dh_auto_clean:
	dh_auto_clean
	rm -f memory_allocator/*.c
	rm -f memory_allocator/*.so
	rm -rf memory_allocator.egg-info
