#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie

export HYPOTHESIS_DATABASE_FILE = $(CURDIR)/debian/hypothesis
export ARGON2_CFFI_USE_SYSTEM = 1

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

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(CURDIR)/debian/hypothesis

override_dh_auto_build:
	dh_auto_build
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	PYTHONPATH=`pybuild --print build_dir --interpreter python3` $(MAKE) -C docs html
endif
