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

export PY3VER=$(shell py3versions -vd)

export PYBUILD_NAME=fluids
export PYBUILD_INSTALL_ARGS=--install-layout=deb
export PYBUILD_TEST_ARGS={build_dir}/tests

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

override_dh_auto_build: export http_proxy=127.0.0.1:9
override_dh_auto_build: export https_proxy=127.0.0.1:9
override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. python3 -m sphinx -N -bhtml docs/ build/html # HTML generator

override_dh_installdocs:
	dh_installdocs --doc-main-package=python-fluids-doc -ppython-fluids-doc
	dh_installdocs --doc-main-package=python-fluids-doc -ppython3-fluids

override_dh_sphinxdoc:
	dh_link -ppython-fluids-doc /usr/share/javascript/mathjax/MathJax.js /usr/share/doc/python-fluids-doc/html/_static/MathJax.js
	dh_sphinxdoc

override_dh_auto_install:
	find . -type f -name LICENSE -delete
	dh_auto_install

override_dh_missing:
	dh_missing --fail-missing
