#!/usr/bin/make -f

export PYBUILD_NAME=refnx
export FORCE_SOURCE_DATE=1

pyversion=$(shell python3 -c 'import sys;print("%d.%d"%(sys.version_info.major,sys.version_info.minor))')

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

execute_after_dh_clean:
	rm -f src/*.o src/_*.cpp src/_*.c refnx/version.py
	make -C paper clean

execute_after_dh_auto_build:
	make -C paper

override_dh_auto_test:

execute_after_dh_auto_install:
	mv $(CURDIR)/debian/python3-refnx/usr/bin/refnx $(CURDIR)/debian/python3-refnx/usr/lib/python$(pyversion)/dist-packages/refnx/refnx-gui
	cp $(CURDIR)/debian/refnx-wrapper $(CURDIR)/debian/python3-refnx/usr/bin/refnx
