1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
export PYBUILD_NAME=nipype
export HOME=$(CURDIR)/build
PY3VERS = $(shell py3versions -vr)
PY3VER = $(shell py3versions -vd)
IPYTHONVER := $(shell ipython3 -V || echo 0) # recent only needed for sphinxext
IPYTHONPATH := $(shell dpkg --compare-versions $(IPYTHONVER) lt 1 \
&& echo ":/usr/lib/python$(PY3VER)/dist-packages/IPython1X" || echo '')
# just to prevent useless complaints
export FSLOUTPUTTYPE=NIFTI_GZ
# Disable etelemtry
export NIPYPE_NO_ET=1
export NO_ET=1
%:
dh $@ --with python3 --buildsystem=pybuild
override_dh_auto_build:
mkdir -p build
echo "backend : Agg" >| build/matplotlibrc
/bin/ls doc/changelog/*changelog | tac | xargs cat >| debian/nipype.changelog
dh_auto_build
#
# Documentation
#
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
: # TODO: We need to set matplotlib backend to Agg before building...
export PYTHONPATH=$$PWD$(IPYTHONPATH) MPLCONFIGDIR=$(CURDIR)/build; cd doc; LC_ALL=C.UTF-8 $(MAKE) html
endif
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
export PYTHONPATH=$(shell pybuild --print build_dir --interpreter python3); \
cd build && \
MPLCONFIGDIR=$(CURDIR)/build LC_ALL=C.UTF-8 py.test-3 -v --doctest-modules -k "not nipype.interfaces.io.BIDSDataGrabber" ../nipype
# test_mesh_ops needs X for bloody tvtk.api, and then fails anyways with current mayavi2/tvtk:
# https://github.com/nipy/nipype/issues/1218, so skipping it for now
endif
: # no executable spreadsheets
find debian -iname *csv -print0 | xargs -r -0 chmod a-x
# use jquery from Debian package
# symlinked by debhelper
override_dh_installdocs:
-rm doc/_build/html/_static/jquery.js
-rm doc/_build/html/_static/underscore.js
dh_installdocs
# immediately useable documentation
# and exemplar data (they are small excerpts anyways)
override_dh_compress:
dh_compress \
--exclude .py \
--exclude .pdf \
--exclude .html \
--exclude .css \
--exclude .jpg \
--exclude .txt \
--exclude .js \
--exclude .json \
--exclude .rtc \
--exclude .par \
--exclude .bin
override_dh_clean:
rm -rf build pypeline.log debian/nipype.changelog
$(MAKE) -C doc clean
dh_clean
|