[python-astropy] 02/02: Adjust patches for new version

Ole Streicher olebole-guest at moszumanska.debian.org
Wed Sep 24 18:56:33 UTC 2014


This is an automated email from the git hooks/post-receive script.

olebole-guest pushed a commit to branch debian
in repository python-astropy.

commit d5eaee7945626bec293f51fe620ee6f616d03366
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Wed Sep 24 20:56:01 2014 +0200

    Adjust patches for new version
---
 debian/changelog                       |  8 +++--
 debian/control                         |  4 +--
 debian/patches/series                  |  2 +-
 debian/patches/support_numpy_1.9.patch | 59 ----------------------------------
 debian/patches/use_wcslib_4.24.patch   | 36 +++++++++++++++++++++
 5 files changed, 44 insertions(+), 65 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 8815335..6e20e14 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,10 @@
-python-astropy (0.4.1+dfsg2-2) UNRELEASED; urgency=low
+python-astropy (0.4.2-1) unstable; urgency=low
 
-  * build-depend on libcfitsio-dev instead of libcfitsio3-dev. Closes: #761716
+  * New upstream release.
+  * Build-depend on libcfitsio-dev instead of libcfitsio3-dev. Closes: #761716
+  * Upgrade to Standards-Version 3.9.6 (no changes needed)
 
- -- Ole Streicher <olebole at debian.org>  Tue, 16 Sep 2014 14:10:36 +0200
+ -- Ole Streicher <olebole at debian.org>  Wed, 24 Sep 2014 14:49:35 +0200
 
 python-astropy (0.4.1+dfsg2-1) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index f2d9835..d7c74aa 100644
--- a/debian/control
+++ b/debian/control
@@ -24,9 +24,9 @@ Build-Depends: cython,
                python3-matplotlib,
                python3-numpy (>= 1:1.6.2),
                python3-setuptools (>= 0.6.4),
-               wcslib-dev (>= 4.23),
+               wcslib-dev (>= 4.24),
                zlib1g-dev
-Standards-Version: 3.9.5
+Standards-Version: 3.9.6
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-astro/packages/python-astropy.git
 Vcs-Git: git://anonscm.debian.org/debian-astro/packages/python-astropy.git
 Homepage: http://astropy.org
diff --git a/debian/patches/series b/debian/patches/series
index 6abf890..31a0178 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,4 @@
 mark_known_failures.patch
 use_extern_ply.patch
 disable_helper.patch
-support_numpy_1.9.patch
+use_wcslib_4.24.patch
diff --git a/debian/patches/support_numpy_1.9.patch b/debian/patches/support_numpy_1.9.patch
deleted file mode 100644
index c203f15..0000000
--- a/debian/patches/support_numpy_1.9.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From: Marten van Kerkwijk <mhvk at astro.utoronto.ca>
-Date: Fri, 12 Sep 2014 17:07:43 -0400
-Subject: Support numpy 1.9, adapting Quantity.__eq__, __ne__
-Bug: http://bugs.debian.org/761392
---- a/astropy/units/quantity.py
-+++ b/astropy/units/quantity.py
-@@ -13,6 +13,7 @@
- import numbers
- 
- import numpy as np
-+NUMPY_LT_1P9 = [int(x) for x in np.__version__.split('.')[:2]] < [1, 9]
- 
- # AstroPy
- from ..extern import six
-@@ -694,6 +695,34 @@
-         else:
-             return value
- 
-+    if not NUMPY_LT_1P9:
-+        # Equality (return False if units do not match) needs to be handled
-+        # explicitly for numpy >=1.9, since it no longer traps errors.
-+        def __eq__(self, other):
-+            try:
-+                try:
-+                    return super(Quantity, self).__eq__(other)
-+                except DeprecationWarning:
-+                    # We treat the DeprecationWarning separately, since it may
-+                    # mask another Exception.  But we do not want to just use
-+                    # np.equal, since super's __eq__ treats recarrays correctly.
-+                    return np.equal(self, other)
-+            except UnitsError:
-+                return False
-+            except TypeError:
-+                return NotImplemented
-+
-+        def __ne__(self, other):
-+            try:
-+                try:
-+                    return super(Quantity, self).__ne__(other)
-+                except DeprecationWarning:
-+                    return np.not_equal(self, other)
-+            except UnitsError:
-+                return True
-+            except TypeError:
-+                return NotImplemented
-+
-     # Arithmetic operations
-     def __mul__(self, other):
-         """ Multiplication between `Quantity` objects and other objects."""
---- a/CHANGES.rst
-+++ b/CHANGES.rst
-@@ -372,6 +372,7 @@
-     for more details on the motivation behind and implementation of
-     astropy-helpers.  [#1563]
- 
-+- Ensure numpy 1.9 is supported. [#2917]
- 
- API Changes
- ^^^^^^^^^^^
diff --git a/debian/patches/use_wcslib_4.24.patch b/debian/patches/use_wcslib_4.24.patch
new file mode 100644
index 0000000..dcd551f
--- /dev/null
+++ b/debian/patches/use_wcslib_4.24.patch
@@ -0,0 +1,36 @@
+--- a/astropy/wcs/include/wcslib/wcs.h
++++ b/astropy/wcs/include/wcslib/wcs.h
+@@ -1,4 +1,4 @@
+-/*============================================================================
++1/*============================================================================
+ 
+   WCSLIB 4.23 - an implementation of the FITS WCS standard.
+   Copyright (C) 1995-2014, Mark Calabretta
+@@ -1568,7 +1568,7 @@
+ int wcssub(int alloc, const struct wcsprm *wcssrc, int *nsub, int axes[],
+            struct wcsprm *wcsdst);
+ 
+-int wcscompare(int cmp, const struct wcsprm *wcs1, const struct wcsprm *wcs2,
++int wcscompare(int cmp, double tol, const struct wcsprm *wcs1, const struct wcsprm *wcs2,
+                int *equal);
+ 
+ int wcsfree(struct wcsprm *wcs);
+--- a/astropy/wcs/src/wcslib_wrap.c
++++ b/astropy/wcs/src/wcslib_wrap.c
+@@ -751,7 +751,7 @@
+ 
+   wcsprm_python2c(&self->x);
+   wcsprm_python2c(&other->x);
+-  status = wcscompare(cmp, &self->x, &other->x, &equal);
++  status = wcscompare(cmp, 0.0, &self->x, &other->x, &equal);
+   wcsprm_c2python(&self->x);
+   wcsprm_c2python(&other->x);
+ 
+@@ -1698,6 +1698,7 @@
+     wcsprm_python2c(bx);
+     status = wcscompare(
+         WCSCOMPARE_ANCILLARY,
++	0.0,
+         ax, bx, &equal);
+     wcsprm_c2python(ax);
+     wcsprm_c2python(bx);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/python-astropy.git



More information about the debian-science-commits mailing list