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 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
export PYTHONWARNINGS=d
export CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
export CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
export LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
PYVERS = $(shell pyversions -vr)
PACKAGE_NAME = python-pywt
MODULE_NAME = PyWavelets
TESTS = \
test_doc.py \
test_perfect_reconstruction.py \
test_regression.py
pythonpath = $$(_py_=$(strip $(1)); _py_=$${_py_\#python}; ls -d $(CURDIR)/build/lib.*-$${_py_})
clean:
dh_testdir
dh_testroot
rm -rf build doc/build src/_pywt.[ch]
rm -rf $(MODULE_NAME).egg-info
find . -name '*\.py[co]' -delete
dh_clean install-stamp install-ext-* build-stamp build-ext-* build-docs
build: build-arch build-indep
build-arch: build-stamp
build-indep:
build-stamp: build-docs $(PYVERS:%=build-ext-%)
touch $@
build-docs:
make -C doc html
touch $@
build-ext-%:
dh_testdir
python$* setup.py build
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
set -e; \
cd tests; \
for test in $(TESTS); do \
PYTHONPATH=$(call pythonpath,python$*) python$* $$test; \
done
endif
touch $@
install: install-stamp
install-stamp: build-stamp $(PYVERS:%=install-ext-%)
install-ext-%:
python$* setup.py install \
--root $(CURDIR)/debian/$(PACKAGE_NAME) --install-layout=deb
binary-indep:
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs CHANGES.txt
dh_installdocs
dh_sphinxdoc
dh_link usr/share/doc/python-pywt/copyright usr/share/doc/python-pywt/html/_downloads/COPYING.txt
dh_installexamples -a
dh_python2 -a
dh_strip -a
dh_compress -X.py -Xobjects.inv -X.txt
dh_fixperms
dh_installdeb
dh_shlibdeps -a
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
get-orig-source:
REV=$(shell dpkg-parsechangelog | sed -rne 's,^Version: .*svn([^-]+).*,\1,p'); \
VER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p'); \
if [ x$$REV = x ]; then \
uscan --force-download --rename --download-version=$$VER --destdir=.; \
else \
svn -q export -r $$REV http://wavelets.scipy.org/svn/multiresolution/pywt/trunk pywavelets-r$$REV && \
tar -zcf ./pywavelets_$$VER.orig.tar.gz pywavelets-r$$REV; \
rm -rf pywavelets-r$$REV; \
fi
.PHONY: clean binary-indep binary-arch binary
|