#!/usr/bin/make -f

export PYBUILD_NAME=gplearn
export PYBUILD_TEST_ARGS=-k '\
		not test_sklearn_regressor_checks \
		and not test_sklearn_classifier_check \
		and not test_parallel_custom_metric \
		and not test_parallel_custom_function \
		and not test_parallel_custom_transformer \
		and not test_get_n_jobs'

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

override_dh_installdocs:
	https_proxy='127.0.0.1:9' http_proxy='127.0.0.1:9' sphinx-build -b html doc build/sphinx/html

	# Replace tex-mml-chtml.js URLs with local paths
	find -type f -name "*.html" -exec sed -i 's|https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js|/usr/share/nodejs/mathjax-full/components/src/tex-mml-chtml/tex-mml-chtml.js|g' {} +

	dh_installdocs -ppython-gplearn-doc --doc-main-package=python-gplearn-doc build/sphinx/html
	dh_installdocs