#!/usr/bin/make -f

export PYBUILD_NAME = pwntools
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
export PYBUILD_AFTER_INSTALL=$(CURDIR)/debian/rules run-sphinx PYTHONPATH=$(CURDIR)/debian/python3-$(PYBUILD_NAME){install_dir}
endif

%:
	dh $@ --buildsystem=pybuild

# Tests are written as doctests
override_dh_auto_test:

run-sphinx:
	$(MAKE) -C docs html
