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
|
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
include /usr/share/cdbs/1/rules/debhelper.mk
DEB_PYTHON_MODULE_PACKAGE = python-nipype
DEB_PYTHON_MODULE_PACKAGES = python-nipype
include /usr/share/cdbs/1/class/python-distutils.mk
DEB_DESTDIR = $(CURDIR)/debian/python-nipype
export HOME=$(CURDIR)/build
PYVERS = $(shell pyversions -vr)
PYVER = $(shell pyversions -vd)
IPYTHONVER := $(shell ipython -V || echo 0) # recent only needed for sphinxext
IPYTHONPATH := $(shell dpkg --compare-versions $(IPYTHONVER) lt 1 \
&& echo ":/usr/lib/python$(PYVER)/dist-packages/IPython1X" || echo '')
# just to prevent useless complaints
export FSLOUTPUTTYPE=NIFTI_GZ
build/python-nipype::
mkdir -p build
echo "backend : Agg" >| build/matplotlibrc
/bin/ls doc/changelog/*changelog | tac | xargs cat >| debian/nipype.changelog
#
# Documentation
#
doc: doc-stamp
doc-stamp: build/python-nipype
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
touch $@
endif
build/python-nipype-doc:: doc
install/python-nipype::
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
export PYTHONPATH=`/bin/ls -d $(DEB_DESTDIR)/usr/lib/python$(cdbs_python_current_version)/*-packages`$(IPYTHONPATH); \
cd build && \
MPLCONFIGDIR=$(CURDIR)/build LC_ALL=C.UTF-8 py.test -v --doctest-modules ../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
install/python-nipype-doc::
-rm doc/_build/html/_static/jquery.js
-rm doc/_build/html/_static/underscore.js
# immediately useable documentation
# and exemplar data (they are small excerpts anyways)
DEB_COMPRESS_EXCLUDE := .py .pdf .html .css .jpg .txt .js .json .rtc .par .bin
# -doc package contents
DEB_INSTALL_DOCS_python-nipype-doc := doc/_build/html
#doc/_build/latex/nipype.pdf
clean::
rm -rf build pypeline.log debian/nipype.changelog
$(MAKE) -C doc clean
.PHONY: doc clean
|