diff options
author | Picca Frédéric-Emmanuel <picca@debian.org> | 2017-08-02 11:00:20 +0100 |
---|---|---|
committer | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2017-08-18 14:49:44 +0200 |
commit | 9476c9afc088a4738a81c0248ee1510b0d8ad860 (patch) | |
tree | 24e94732e8bd4f12a3b65c986480be921bd26a0d /debian/rules | |
parent | f7bdc2acff3c13a6d632c28c4569690ab106eed7 (diff) |
Import Debian changes 0.5.0+dfsg-1
silx (0.5.0+dfsg-1) unstable; urgency=medium
* Initial release (Closes: #871637)
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..b04892d --- /dev/null +++ b/debian/rules @@ -0,0 +1,77 @@ +#!/usr/bin/make -f + +# when activated do not forget to remove the +# python[3]-hdf5-dbg Build-Depends +JESSIE_BACKPORTS ?= 0 + +ifeq ($(JESSIE_BACKPORTS), 0) +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +else +export PYBUILD_DISABLE_python2-dbg=test +export PYBUILD_DISABLE_python3-dbg=test +endif + +export POCL_CACHE_DIR=$(CURDIR)/.cache/ +export PYBUILD_AFTER_INSTALL=rm -rf {destdir}/usr/bin/ +export PYBUILD_NAME=silx +export SPECFILE_USE_GNU_SOURCE=1 + +# Make does not offer a recursive wildcard function, so here's one: +rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2)) + +# How to recursively find all files with the same name in a given folder +ALL_PYX := $(call rwildcard,silx/,*.pyx) +#NOTA: No space before * + +%: + dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild + +override_dh_clean: + dh_clean + # remove the cython generated file to force rebuild + rm -f $(patsubst %.pyx,%.cpp,${ALL_PYX}) + rm -f $(patsubst %.pyx,%.c,${ALL_PYX}) + rm -f $(patsubst %.pyx,%.html,${ALL_PYX}) + rm -rf build/html build/man + rm -rf *.egg-info + rm -rf $(POCL_CACHE_DIR) + +override_dh_auto_build: + python setup.py build build_man + dh_auto_build + +override_dh_install: + dh_numpy + dh_numpy3 + + # install scripts into silx + python3 setup.py install_scripts -d debian/silx/usr/bin + + # install the qtdesigner files only for the python3 package + dh_install -p python3-silx qtdesigner_plugins/*.py /usr/lib/qt4/plugins/designer/python + + dh_install + +# WITH_QT_TEST=False to disable graphical tests +# SILX_OPENCL=False to disable OpenCL tests +# SILX_TEST_LOW_MEM=True to disable tests taking large amount of memory +# GPU=False to disable the use of a GPU with OpenCL test +# WITH_GL_TEST=False to disable tests using OpenGL +# UNACTIVATED UNTIL dh_python from UNSTABLE IS FIXED +# https://lists.debian.org/debian-python/2017/08/msg00095.html +override_dh_auto_test: +ifeq ($(JESSIE_BACKPORTS), 0) + mkdir -p $(POCL_CACHE_DIR) # create POCL cachedir in order to avoid an FTBFS in sbuild + dh_auto_test -- -s custom --test-args="env PYTHONPATH={build_dir} GPU=False SILX_OPENCL=False SILX_TEST_LAW_MEM=True xvfb-run -a --server-args=\"-screen 0 1024x768x24\" {interpreter} run_tests.py -v" +endif + +override_dh_installman: + dh_installman -p silx build/man/*.1 + +override_dh_sphinxdoc: +ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) + mkdir -p $(POCL_CACHE_DIR) # create POCL cachedir in order to avoid an FTBFS in sbuild + python setup.py build build_doc + dh_installdocs "build/sphinx/html" -p python-silx-doc + dh_sphinxdoc -O--buildsystem=pybuild +endif |