#!/usr/bin/make -f

export DEB_VERSION_UPSTREAM ?= $(shell awk -F'[()]' 'NR==1{split($$2,v,"-");print v[1]}' debian/changelog)
export PYBUILD_NAME=etelemetry
export PYBUILD_TEST_ARGS=-v {dir}/etelemetry/tests/ \
 -k 'not test_etrequest \
 and not test_get_project \
 and not test_check_available \
 '

export PYBUILD_AFTER_INSTALL= rm -fr {destdir}/usr/lib/python3*/dist-packages/etelemetry/tests \
	                      rm -fr {destdir}/usr/lib/python3*/dist-packages/$(PYBUILD_NAME)-*/top_level.txt

# Should redirect remote access but does not help either
# export https_proxy=http://127.0.0.1:9/

# DH_VERBOSE := 1
export LC_ALL=C.UTF-8

# for hardening you might like to uncomment this:
# export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@ --buildsystem=pybuild
