#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk

# Documentation
build/python-netaddr-docs::
	PYTHONPATH=$(CURDIR) sphinx-build -q docs/source docs/api
binary-fixup/python-netaddr-docs::
	dh_sphinxdoc -p$(cdbs_curpkg)

# Tests
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
install/python-netaddr install/python3-netaddr::
	$(call cdbs_python_binary,python$(cdbs_python_compile_version)) \
		debian/runtests.py .
endif

clean::
	-rm -rf docs/api
