#! /usr/bin/make -f

#export DEB_BUILD_OPTIONS=nocheck
export DEB_BUILD_MAINT_OPTIONS=nocheck

export PYBUILD_NAME=biomaj-download
%:
	dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_build:
	cd biomaj_download/message && protoc --python_out=. downmessage.proto
	dh_auto_build

override_dh_install:
	dh_install
	sed -i '1s;^;#!/usr/bin/python3\n;' debian/python3-biomaj3-download/usr/bin/biomaj_download_consumer.py

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	LOCAL_IRODS=0 NETWORK=0 python3 -m pytest -v tests/biomaj_tests.py
endif
