File: rules

package info (click to toggle)
nipype 0.5.3-2wheezy2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,884 kB
  • sloc: python: 36,872; tcl: 597; makefile: 167
file content (61 lines) | stat: -rwxr-xr-x 1,824 bytes parent folder | download
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
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-

include /usr/share/cdbs/1/rules/debhelper.mk
DEB_PYTHON_SYSTEM = pysupport
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

build/python-nipype::
	mkdir -p build
	echo "backend : Agg" >| build/matplotlibrc

#
# 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 MPLCONFIGDIR=$(CURDIR)/build; cd doc; $(MAKE) html
	touch $@
endif

build/python-nipype-doc:: doc

install/python-nipype::
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cd debian && \
	 PYTHONPATH=$(DEB_DESTDIR)/usr/lib/python$(cdbs_python_current_version)/site-packages \
     MPLCONFIGDIR=$(CURDIR)/build \
	  nosetests -v nipype -e test_spm_path
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
	: # In documentation (.html), fix paths to .py source files
	find doc/_build/html -iname '*.html' \
	| xargs sed -ie 's,file://$(CURDIR),file:///usr/share/pyshared,g'
	: # Prune sphinx bi-products (.htmle) files
	-find doc/_build/html -iname '*.htmle' -delete

# 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
	$(MAKE) -C doc clean

.PHONY: doc clean