[Python-modules-commits] r6319 - in packages/mpmath/trunk/debian (7 files)

morph-guest at users.alioth.debian.org morph-guest at users.alioth.debian.org
Sat Aug 23 22:40:42 UTC 2008


    Date: Saturday, August 23, 2008 @ 22:40:41
  Author: morph-guest
Revision: 6319

run tests at build time (added python-codespeak-lib build-dep for this); added removal of compiled python code; use of debian/dir for subdir docs creation; backport of upstream patch for fix {inf|nan}/2**N

Added:
  packages/mpmath/trunk/debian/dirs
  packages/mpmath/trunk/debian/patches/20_fix_nan_or_inf_div_by_2n.dpatch
Modified:
  packages/mpmath/trunk/debian/changelog
  packages/mpmath/trunk/debian/control
  packages/mpmath/trunk/debian/patches/00list
  packages/mpmath/trunk/debian/rules
Deleted:
  packages/mpmath/trunk/debian/TODO.Debian

Deleted: packages/mpmath/trunk/debian/TODO.Debian
===================================================================
--- packages/mpmath/trunk/debian/TODO.Debian	2008-08-23 22:17:45 UTC (rev 6318)
+++ packages/mpmath/trunk/debian/TODO.Debian	2008-08-23 22:40:41 UTC (rev 6319)
@@ -1 +0,0 @@
-- run tests?

Modified: packages/mpmath/trunk/debian/changelog
===================================================================
--- packages/mpmath/trunk/debian/changelog	2008-08-23 22:17:45 UTC (rev 6318)
+++ packages/mpmath/trunk/debian/changelog	2008-08-23 22:40:41 UTC (rev 6319)
@@ -9,15 +9,22 @@
     - bump Standards-Version to 3.8.0 (no changes needed)
     - added libjs-jquery to depends, needed for sphinx doc
     - added dpatch to build-dep
+    - added python-codespeak-lib to build-dep-indep (needed to run tests)
   * debian/rules
     - build and install sphinx doc
     - removed embedded jquery.js, linking to the one from libjs-jquery
     - added dh_link call
     - enabled dpatch stuff
+    - added execution of tests at build time
+    - added removal of compiled Python code; thanks to Piotr for the fix
   * debian/copyright
     - extended copyright years
   * debian/patches/10_fix_doc_version.dpatch
     - added to fix the doc version of mpmath
+  * debian/patches/20_fix_nan_or_inf_div_by_2n.dpatch
+    - backported from upstream SVN: fix inf/2**n and nan/2**n returning zero
+  * debian/dirs
+    - added to create doc subdirs
 
   [ Ondrej Certik ]
   * Ondrej Certik added to Uploaders
@@ -25,7 +32,7 @@
   [ Piotr Ożarowski ]
   * added "DM-Upload-Allowed: yes"
 
- -- Sandro Tosi <matrixhasu at gmail.com>  Sat, 23 Aug 2008 22:54:12 +0200
+ -- Sandro Tosi <matrixhasu at gmail.com>  Sun, 24 Aug 2008 00:31:56 +0200
 
 mpmath (0.8-1) unstable; urgency=low
 

Modified: packages/mpmath/trunk/debian/control
===================================================================
--- packages/mpmath/trunk/debian/control	2008-08-23 22:17:45 UTC (rev 6318)
+++ packages/mpmath/trunk/debian/control	2008-08-23 22:40:41 UTC (rev 6319)
@@ -4,7 +4,7 @@
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Sandro Tosi <matrixhasu at gmail.com>, Ondrej Certik <ondrej at certik.cz>
 Build-Depends: debhelper (>= 5), python, dpatch
-Build-Depends-Indep: python-support (>= 0.4), python-sphinx
+Build-Depends-Indep: python-support (>= 0.4), python-sphinx, python-codespeak-lib
 Standards-Version: 3.8.0
 Homepage: http://code.google.com/p/mpmath/
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/mpmath/trunk/

Added: packages/mpmath/trunk/debian/dirs
===================================================================
--- packages/mpmath/trunk/debian/dirs	                        (rev 0)
+++ packages/mpmath/trunk/debian/dirs	2008-08-23 22:40:41 UTC (rev 6319)
@@ -0,0 +1,2 @@
+usr/share/doc/python-mpmath/html/
+usr/share/doc/python-mpmath/txt/

Modified: packages/mpmath/trunk/debian/patches/00list
===================================================================
--- packages/mpmath/trunk/debian/patches/00list	2008-08-23 22:17:45 UTC (rev 6318)
+++ packages/mpmath/trunk/debian/patches/00list	2008-08-23 22:40:41 UTC (rev 6319)
@@ -1 +1,2 @@
 10_fix_doc_version
+20_fix_nan_or_inf_div_by_2n

Added: packages/mpmath/trunk/debian/patches/20_fix_nan_or_inf_div_by_2n.dpatch
===================================================================
--- packages/mpmath/trunk/debian/patches/20_fix_nan_or_inf_div_by_2n.dpatch	                        (rev 0)
+++ packages/mpmath/trunk/debian/patches/20_fix_nan_or_inf_div_by_2n.dpatch	2008-08-23 22:40:41 UTC (rev 6319)
@@ -0,0 +1,55 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 20_fix_nan_or_inf_div_by_2n.dpatch by Sandro Tosi <matrixhasu at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Backported from upstream SVN: fix inf/2**n and nan/2**n returning zero
+
+ at DPATCH@
+diff -urNad mpmath~/mpmath/lib.py mpmath/mpmath/lib.py
+--- mpmath~/mpmath/lib.py	2008-08-23 16:44:22.000000000 +0200
++++ mpmath/mpmath/lib.py	2008-08-24 00:15:39.622164500 +0200
+@@ -802,9 +802,7 @@
+     """Floating-point division"""
+     ssign, sman, sexp, sbc = s
+     tsign, tman, texp, tbc = t
+-    if not sman or tman <= 1:
+-        if tman == 1:
+-            return normalize1(ssign^tsign, sman, sexp-texp, sbc, prec, rnd)
++    if not sman or not tman:
+         if s == fzero:
+             if t == fzero: raise ZeroDivisionError
+             if t == fnan: return fnan
+@@ -822,6 +820,8 @@
+                 return fnan
+             return {1:finf, -1:fninf}[fsign(s) * fsign(t)]
+         return fzero
++    if tman == 1:
++        return normalize1(ssign^tsign, sman, sexp-texp, sbc, prec, rnd)
+     if ssign:
+         sman = -sman
+     if tsign:
+diff -urNad mpmath~/mpmath/specfun.py mpmath/mpmath/specfun.py
+--- mpmath~/mpmath/specfun.py	2008-08-23 16:44:22.000000000 +0200
++++ mpmath/mpmath/specfun.py	2008-08-24 00:16:00.743368127 +0200
+@@ -1120,6 +1120,8 @@
+ @funcwrapper
+ def ei(z):
+     """Exponential integral, Ei(z)"""
++    if z == inf:
++        return z
+     if z == -inf:
+         return -mpf(0)
+     v = z*hypsum([[1,1],[1,1]],[],[],[[2,1],[2,1]],[],[],z) + \
+diff -urNad mpmath~/mpmath/tests/test_special.py mpmath/mpmath/tests/test_special.py
+--- mpmath~/mpmath/tests/test_special.py	2008-08-23 16:44:20.000000000 +0200
++++ mpmath/mpmath/tests/test_special.py	2008-08-24 00:16:53.530376285 +0200
+@@ -89,3 +89,9 @@
+     assert not (mpf(3) > float_nan)
+     assert not (mpf(3) <= float_nan)
+     assert not (mpf(3) >= float_nan)
++
++def test_div_bug():
++    assert isnan(nan/1)
++    assert isnan(nan/2)
++    assert inf/2 == inf
++    assert (-inf)/2 == -inf


Property changes on: packages/mpmath/trunk/debian/patches/20_fix_nan_or_inf_div_by_2n.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Modified: packages/mpmath/trunk/debian/rules
===================================================================
--- packages/mpmath/trunk/debian/rules	2008-08-23 22:17:45 UTC (rev 6318)
+++ packages/mpmath/trunk/debian/rules	2008-08-23 22:40:41 UTC (rev 6319)
@@ -12,6 +12,10 @@
 
 	python setup.py build;
 
+ifeq (,$(findstring notest,$(DEB_BUILD_OPTIONS)))
+	( cd mpmath/tests ; PYTHONPATH=../../build/lib/ python runtests.py -strict -py )
+endif
+
 	( cd doc ; python build.py )
 	
 	touch $@
@@ -27,6 +31,8 @@
 
 	rm -rf doc/build
 
+	find . -name '*\.py[co]' -delete
+
 	dh_clean 
 
 install: build
@@ -37,10 +43,8 @@
 	# Add here commands to install the package into debian/python-mpmath.
 	python setup.py install --root=debian/python-mpmath;
 
-	mkdir -p $(CURDIR)/debian/python-mpmath/usr/share/doc/python-mpmath/html/
+	# move generated documentation under subdir to keep doc/ dir clean
 	cp -arp doc/build/* $(CURDIR)/debian/python-mpmath/usr/share/doc/python-mpmath/html/
-
-	mkdir -p $(CURDIR)/debian/python-mpmath/usr/share/doc/python-mpmath/txt/
 	cp -arp doc/source/* $(CURDIR)/debian/python-mpmath/usr/share/doc/python-mpmath/txt/
 
 




More information about the Python-modules-commits mailing list