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 75 76 77 78 79
|
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
include /usr/share/cdbs/1/rules/debhelper.mk
DEB_PYTHON_SYSTEM = pysupport
# for earlier cdbs versions
DEB_PYTHON_MODULE_PACKAGE = python-mvpa
# for cdbs >= 0.4.54
DEB_PYTHON_MODULE_PACKAGES = python-mvpa python-mvpa-lib
include /usr/share/cdbs/1/class/python-distutils.mk
# enable the LIBSVM wrapper and disable building provided copy
export PYMVPA_NO_3RD=1
DEB_PYTHON_BUILD_ARGS += --with-libsvm
DEB_PYTHON_INSTALL_ARGS_ALL += --with-libsvm
doc: doc-stamp
doc-stamp:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
$(MAKE) manpages apidoc htmldoc
touch $@
endif
clean::
$(MAKE) distclean
# run at install otherwise at build it tends to do them twice for some
# reason
install/python-mvpa::
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
for buildver in $(cdbs_python_build_versions); do \
echo "I: Running PyMVPA unittests using python$$buildver"; \
cd $(CURDIR) && cd $(DEB_SRCDIR)/build/lib.*-$$buildver && \
ln -s $(CURDIR)/mvpa/data mvpa/ && \
MVPA_TESTS_LOWMEM=yes MVPA_TESTS_QUICK=yes MVPA_TESTS_LABILE=no PYTHONPATH=. \
$(call cdbs_python_binary,python$$buildver) mvpa/tests/main.py && \
rm mvpa/data; \
done
endif
build/python-mvpa-doc:: doc
# use jquery from Debian package
# symlinked by debhelper
install/python-mvpa-doc::
-rm build/html/_static/jquery.js
install/python-mvpa-lib::
# move libraries into the python-mvpa-lib package
for lib in $$(find debian/python-mvpa/usr -name '*.so'); do \
sdir=$$(dirname $$lib) ; \
tdir=debian/python-mvpa-lib/$${sdir#*python-mvpa/} ; \
mkdir -p $$tdir ; \
echo "Moving '$$lib' into '$$tdir'." ; \
mv $$lib $$tdir ; \
done
# we need to move libraries away first, hence dependence on -lib
# Also without this step, movemodules from pysupport would not
# move arch-indep part of the module under pyshared
install/python-mvpa:: install/python-mvpa-lib
binary-install/python-mvpa-lib::
# assure that there is no mvpa module itself
# actually remove everything under ../share/.. since that is provided
# by python-mvpa. That prevents e.g. duplicate egg-info files.
# rm -rf debian/python-mvpa-lib/usr/share/python-support/python-mvpa-lib/*
# install directly into package directory (despite multiple packages)
DEB_DESTDIR = $(CURDIR)/debian/python-mvpa
# 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
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
DEB_INSTALL_DOCS_python-mvpa-doc := build/html
DEB_INSTALL_EXAMPLES_python-mvpa-doc := doc/examples/*
endif
|