#!/usr/bin/make -f

export LC_ALL=C.UTF-8
export PYBUILD_INSTALL_DIR=/usr/share/beets/
# https://github.com/beetbox/beets/issues/1876
export PYBUILD_TEST_ARGS=-k "not test_completion"

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

execute_after_dh_auto_build:
ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
	PYTHONPATH=$(CURDIR) $(MAKE) -C docs html man
endif

override_dh_installchangelogs:
	dh_installchangelogs docs/changelog.rst
