#!/usr/bin/make -f

#export DH_VERBOSE=1

export PYBUILD_NAME=pygments
export PYBUILD_TEST_ARGS=-v -k 'not test_chooses_correct_lexer_for_example_files and not test_guess_lexer_singularity and not test_guess_lexer_forth and not test_guess_lexer_modula2 and not test_guess_lexer_unicon and not test_guess_lexer_ezhil and not test_guess_lexer_gdscript and not test_guess_lexer_gap and not test_guess_lexer_easytrieve and not test_guess_lexer_jcl and not test_guess_lexer_rexx'

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

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build Pygments.egg-info doc/_build
	find . -name "*\.py[co]" -delete

execute_after_dh_auto_build:
	PYTHONPATH=$(CURDIR):$(CURDIR)/doc make -C doc html

override_dh_auto_install:
	dh_auto_install
	install -m 644 external/pygments.bashcomp debian/python3-pygments/usr/share/bash-completion/completions/pygmentize

override_dh_installchangelogs:
	dh_installchangelogs -i CHANGES

override_dh_compress:
	dh_compress -i -X.py -X.inv
