#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

MODULE_DIR = usr/lib/$(shell pyversions -d)/dist-packages/hgext/git/

%:
	dh $@ --with python2 --buildsystem python_distutils

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# Not running the test since as of 0.8.0, 2 tests in it fail
	#make tests
endif

# python setup.py install installs it as hggit, whereas mercurial searches for
# it in hgext/git.  Copy it manually.  As mercurial is the only module that
# should be importing this, the lack of egg-info shouldn't cause any problems
override_dh_auto_install:
	mkdir -p debian/mercurial-git/$(MODULE_DIR)
	cp -r hggit/*.py debian/mercurial-git/$(MODULE_DIR)
