#!/usr/bin/make -f # -*- makefile -*- PACKAGE_NAME = python3-nitime PACKAGE_ROOT_DIR = debian/${PACKAGE_NAME} INSTALL_PATH = $(CURDIR)/debian/tmp # default Python PYTHON=$(shell py3versions -d) # override matplotlib config directory export MPLCONFIGDIR=$(CURDIR)/build export HOME=$(CURDIR)/build %: dh $@ --with python3 --buildsystem pybuild override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) : # Do not test just after build, lets install and then test endif override_dh_auto_install: dh_auto_install mkdir -p $(MPLCONFIGDIR) # just in case echo "backend : Agg" >| $(MPLCONFIGDIR)/matplotlibrc : # Prune duplicate LICENSE file find debian/ -name LICENSE -delete : # Only now lets build docs ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) export PYTHONPATH=$$(/bin/ls -d $(INSTALL_PATH)/usr/lib/$(PYTHON)/*-packages); \ $(MAKE) -C doc html-no-exec # TODO: remove -no-exec when doc/examples/filtering_fmri.py is fixed -rm doc/_build/html/_static/jquery.js -rm doc/_build/html/_static/underscore.js -rm -r doc/_build/html/_sources : # objects inventory is of no use for the package -rm doc/_build/html/objects.inv for f in `find . -name "*.html"`; do \ sed -i '/cloudflare/d' $$f; \ done endif # All tests later on # cd build to prevent use of local/not-built source tree ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) cd build; \ for PYTHON in $(shell py3versions -r); do \ echo "I: Running NiTime unittests using $$PYTHON"; \ PYTHONPATH=$$(/bin/ls -d $(INSTALL_PATH)/usr/lib/$$PYTHON/*-packages) \ MPLCONFIGDIR=/tmp/ \ $$PYTHON /usr/bin/nosetests3 '--exclude=test_(coherence_linear_dependence|lazy_reload)' nitime; \ done endif ## immediately useable documentation ## and exemplar data (they are small excerpts anyway) override_dh_compress: dh_compress -X.py -X.html -X.css -X.jpg -X.txt -X.js -X.json -X.rtc -X.par -X.bin override_dh_clean: dh_clean @echo "I: Removing other generated material" rm -rf build doc/_build doc/examples/fig doc/api/generated/ doc/examples/*rst get-orig-source: -uscan --upstream-version 0 --rename