#!/usr/bin/make -f
PYVERS = $(shell pyversions -r -v)

%:
	dh $@ --with python2

# this does not seem to help setup.py test - it STILL builds and uses .pyc and .so files in duplicity...
# python sucks.
override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	set -e -x;\
	for py in $(PYVERS); do \
  PYTHONPATH=$(CURDIR)/build/lib.*-$$py  python$$py ./setup.py test ;\
  done
endif

override_dh_auto_install:
	dh_auto_install

# docs in just one place, /usr/share/doc/duplicity.
	rm -r debian/duplicity/usr/share/doc/duplicity-*

override_dh_clean:
	dh_clean
# the test suite leaves a mess behind 
	rm -f testing/gnupg/random_seed duplicity/_librsync.so
