#!/usr/bin/make -f

export PYBUILD_NAME = pyraf

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

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	dh_auto_test -- --system=custom --test-args '{interpreter} {dir}/debian/tests/pyraf-test.py'
endif

override_dh_clean:
	dh_clean
	rm -rf lib/pyraf.egg-info/

override_dh_auto_install:
	dh_auto_install
	find debian -type d -name clcache.v2 -print0 | xargs -0r rm -rfv
