Package: python-numpy Version: 1:1.6.2-1 Severity: wishlist Tags: patch Actually here are two patches (ready to be committed to SVN happen the maintainer approves)
- one assures that all for loops are secured with set -e, so if any command fails, the loop fails (do not remember who pointed me to this drawback in my packages originally, thanks again ;) ) - tests failures are not ignored imho it is much better to submit packages with only known to fail tests disabled/excluded or even better resolved -- that provides some guarantee that there is no unknown issues left yes -- currently it would lead to FTBFS since all (or nearly all -- that is the point, impossible to figure out besides going through all of them 1 by 1) architectures show some kind of test failure or a crash: https://buildd.debian.org/status/package.php?p=python-numpy&suite=experimental -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (900, 'testing'), (600, 'unstable'), (300, 'experimental'), (100, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.2.0-3-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages python-numpy depends on: ii libatlas3-base [liblapack.so.3gf] 3.8.4-7 ii libatlas3gf-base 3.8.4-7 ii libblas3 [libblas3gf] 1.2.20110419-5 ii libblas3gf 1.2.20110419-5 ii libc6 2.13-33 ii libgcc1 1:4.7.2-4 ii libgfortran3 4.7.2-4 ii liblapack3 [liblapack3gf] 3.4.1-4 ii liblapack3gf 3.4.1-4 ii libquadmath0 4.7.2-4 ii python 2.7.3-3 ii python-support 1.0.15 python-numpy recommends no packages. Versions of packages python-numpy suggests: ii gcc 4:4.7.2-1 ii gfortran 4:4.7.1-1 ii python-dev 2.7.3-3 ii python-nose 1.1.2-3 pn python-numpy-dbg <none> ii python-numpy-doc 1:1.6.2-1 -- no debconf information
>From 46bbfedb75f53f8f89ea749c60a4fc7c1ed75e3d Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko <deb...@onerussian.com> Date: Fri, 14 Dec 2012 13:10:34 -0500 Subject: [PATCH 1/2] debian/rules: safe-guard all for loops with 'set -e; ' to prevent uncaught failures --- debian/changelog | 7 +++++++ debian/rules | 32 ++++++++++++++++---------------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index b701e8a..2f5ca09 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +python-numpy (1:1.7.0~b2-2) UNRELEASED; urgency=low + + * debian/rules + - safe-guard all for loops with 'set -e; ' to prevent uncaught failures + + -- Yaroslav Halchenko <deb...@onerussian.com> Fri, 14 Dec 2012 13:08:56 -0500 + python-numpy (1:1.7.0~b2-1) experimental; urgency=low * New upstream beta release diff --git a/debian/rules b/debian/rules index ca48806..fc3d41c 100755 --- a/debian/rules +++ b/debian/rules @@ -16,7 +16,7 @@ export ATLAS=None override_dh_auto_build: dh_auto_build - for v in $(PY3VERS); do \ + set -e; for v in $(PY3VERS); do \ python$$v setup.py build; \ python$$v-dbg setup.py build; \ done @@ -34,11 +34,11 @@ override_dh_installman: mv debian/python3-numpy/usr/share/man/man1/f2py.1 \ debian/python3-numpy/usr/share/man/man1/f2py3.1 # link manpage for versioned and dbg incarnations of f2py - for v in $(PY2VERS); do \ + set -e; for v in $(PY2VERS); do \ dh_link /usr/share/man/man1/f2py.1.gz /usr/share/man/man1/f2py$$v.1.gz; \ dh_link -ppython-numpy-dbg /usr/share/man/man1/f2py.1.gz /usr/share/man/man1/f2py$$v-dbg.1.gz; \ done - for v in $(PY3VERS); do \ + set -e; for v in $(PY3VERS); do \ dh_link -ppython3-numpy /usr/share/man/man1/f2py3.1.gz /usr/share/man/man1/f2py$$v.1.gz; \ dh_link -ppython3-numpy-dbg /usr/share/man/man1/f2py3.1.gz /usr/share/man/man1/f2py$$v-dbg.1.gz; \ done @@ -47,7 +47,7 @@ override_dh_installman: override_dh_install: # add shebang information to f2py script - for v in $(PY2VERS) $(PY3VERS); do \ + set -e; for v in $(PY2VERS) $(PY3VERS); do \ sed -i "1s,#!.*python[^ ]*\(.*\),#!/usr/bin/python$$v," debian/tmp/usr/bin/f2py$$v; \ cp -a debian/tmp/usr/bin/f2py$$v debian/tmp/usr/bin/f2py$$v-dbg ; \ sed -i "1s,#!.*python[^ ]*\(.*\),#!/usr/bin/python$$v-dbg," debian/tmp/usr/bin/f2py$$v-dbg; \ @@ -74,23 +74,23 @@ override_dh_install: find $(CURDIR)/debian/python-numpy/ -name "*_d.so" -delete # create symlinks for .h files - for i in $(PY2VERS); do \ + set -e; for i in $(PY2VERS); do \ [ -d $(CURDIR)/debian/python-numpy/usr/include/python$$i ] || \ mkdir -p $(CURDIR)/debian/python-numpy/usr/include/python$$i; \ dh_link usr/lib/pymodules/python$$i/numpy/core/include/numpy usr/include/python$$i/numpy; \ done - for i in $(PY2VERS); do \ + set -e; for i in $(PY2VERS); do \ [ -d $(CURDIR)/debian/python-numpy/usr/include/python$${i}_d ] || \ mkdir -p $(CURDIR)/debian/python-numpy/usr/include/python$${i}_d; \ dh_link usr/lib/pymodules/python$$i/numpy/core/include/numpy usr/include/python$${i}_d/numpy; \ done # Python 3 - for i in $(PY3VERS); do \ + set -e; for i in $(PY3VERS); do \ [ -d $(CURDIR)/debian/python3-numpy/usr/include/python$$i ] || \ mkdir -p $(CURDIR)/debian/python3-numpy/usr/include/python$$i; \ dh_link -ppython3-numpy usr/lib/python3/dist-packages/numpy/core/include/numpy usr/include/python$$i/numpy; \ done - for i in $(PY3VERS); do \ + set -e; for i in $(PY3VERS); do \ [ -d $(CURDIR)/debian/python3-numpy/usr/include/python$${i}_d ] || \ mkdir -p $(CURDIR)/debian/python3-numpy/usr/include/python$${i}_d; \ dh_link -ppython3-numpy usr/lib/python3/dist-packages/numpy/core/include/numpy/ usr/include/python$${i}_d/numpy; \ @@ -116,7 +116,7 @@ ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) dh_strip -ppython3-numpy --dbg-package=python3-numpy-dbg # dh_strip seemingly doesn't catch the PEP 3149-style debug names rm debian/python3-numpy/usr/lib/python3*/*-packages/*/*/*.cpython-*d*.so - + # fix python-debug-in-wrong-location lintian warning cd debian/python-numpy-dbg/usr/lib/debug/usr/lib && mv pyshared pymodules endif @@ -129,7 +129,7 @@ override_dh_pysupport: mv debian/tmp2/f2py2.? debian/tmp2/f2py debian/python-numpy/usr/bin/ mkdir -p debian/python-numpy-dbg/usr/bin/ mv debian/tmp2/f2py2.?-dbg debian/tmp2/f2py-dbg debian/python-numpy-dbg/usr/bin/ - + mkdir -p debian/python3-numpy/usr/bin/ mv debian/tmp2/f2py3.? debian/tmp2/f2py3 debian/python3-numpy/usr/bin/ mkdir -p debian/python3-numpy-dbg/usr/bin/ @@ -138,7 +138,7 @@ override_dh_pysupport: # GIGANTIC HACK - add back libnpymath.a # get the file names, generate the new location, create the dir if missing, copy # the file and then add it to the public list - for file in ./debian/tmp/usr/lib/python2.*/*-packages/numpy/core/lib/libnpymath.a ; do \ + set -e; for file in ./debian/tmp/usr/lib/python2.*/*-packages/numpy/core/lib/libnpymath.a ; do \ newfile=$$(echo $$file | sed 's|tmp|python-numpy|' | sed "s|lib/python|lib/pyshared/python|" | sed 's|[^/]*-packages/||') ;\ mkdir -p $$(dirname $$newfile) ;\ cp -a $$file $$newfile ;\ @@ -166,26 +166,26 @@ update_intersphinx_mapping: override_dh_auto_install: dh_auto_install - + # Install for Python 3 - for v in $(PY3VERS); do \ + set -e; for v in $(PY3VERS); do \ python$$v setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \ python$$v-dbg setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \ done - + # yes, we need to run tests after install # The reason is that numpy tries hard to not let you run it from the # source directory, so we need to mess with the import order so to # select the code in the installation path ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) - -for v in $(PY2VERS) ; do \ + -set -e; for v in $(PY2VERS) ; do \ echo "-- running tests for "$$v" plain --" ; \ python$$v -c "import sys ; sys.path.insert(0, '$(CURDIR)/debian/tmp/usr/lib/python$$v/dist-packages/') ; import numpy; numpy.test()" ; \ echo "-- running tests for "$$v" debug --" ; \ python$$v-dbg -c "import sys ; sys.path.insert(0, '$(CURDIR)/debian/tmp/usr/lib/python$$v/dist-packages/') ; import numpy; numpy.test()" ; \ done # Python 3.2 maps to python3/ dir alone? bah - -for v in $(PY3VERS) ; do \ + -set -e; for v in $(PY3VERS) ; do \ echo "-- running tests for "$$v" plain --" ; \ python$$v -c "import sys ; sys.path.insert(0, '$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \ echo "-- running tests for "$$v" debug --" ; \ -- 1.8.0
>From 6caadc356f97f13e6d30c83b9b5fae0294e40a48 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko <deb...@onerussian.com> Date: Fri, 14 Dec 2012 13:10:57 -0500 Subject: [PATCH 2/2] test/rules: fail if tests fail --- debian/changelog | 1 + debian/rules | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2f5ca09..04a28ae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ python-numpy (1:1.7.0~b2-2) UNRELEASED; urgency=low * debian/rules - safe-guard all for loops with 'set -e; ' to prevent uncaught failures + - fail if tests fail -- Yaroslav Halchenko <deb...@onerussian.com> Fri, 14 Dec 2012 13:08:56 -0500 diff --git a/debian/rules b/debian/rules index fc3d41c..2415af4 100755 --- a/debian/rules +++ b/debian/rules @@ -178,14 +178,14 @@ override_dh_auto_install: # source directory, so we need to mess with the import order so to # select the code in the installation path ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) - -set -e; for v in $(PY2VERS) ; do \ + set -e; for v in $(PY2VERS) ; do \ echo "-- running tests for "$$v" plain --" ; \ python$$v -c "import sys ; sys.path.insert(0, '$(CURDIR)/debian/tmp/usr/lib/python$$v/dist-packages/') ; import numpy; numpy.test()" ; \ echo "-- running tests for "$$v" debug --" ; \ python$$v-dbg -c "import sys ; sys.path.insert(0, '$(CURDIR)/debian/tmp/usr/lib/python$$v/dist-packages/') ; import numpy; numpy.test()" ; \ done # Python 3.2 maps to python3/ dir alone? bah - -set -e; for v in $(PY3VERS) ; do \ + set -e; for v in $(PY3VERS) ; do \ echo "-- running tests for "$$v" plain --" ; \ python$$v -c "import sys ; sys.path.insert(0, '$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/') ; import numpy; numpy.test()" ; \ echo "-- running tests for "$$v" debug --" ; \ -- 1.8.0