[Debian-astro-commits] [python-pywcs] 01/02: Compatibility with pyfits_3.4: Replace removed pyfits.CardList

Ole Streicher olebole at moszumanska.debian.org
Fri Feb 5 15:01:16 UTC 2016


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

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

commit 3eea503cbfc0751454541a7d61bcd007d758f09c
Author: Ole Streicher <ole at aip.de>
Date:   Fri Feb 5 15:55:51 2016 +0100

    Compatibility with pyfits_3.4: Replace removed pyfits.CardList
---
 debian/changelog                     |  6 ++++++
 debian/patches/pyfits34_compat.patch | 32 ++++++++++++++++++++++++++++++++
 debian/patches/series                |  1 +
 3 files changed, 39 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 2eeb514..6141b44 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-pywcs (1.12-7) unstable; urgency=low
+
+  * Compatibility with pyfits_3.4.
+
+ -- Ole Streicher <olebole at debian.org>  Fri, 05 Feb 2016 15:34:36 +0100
+
 python-pywcs (1.12-6) unstable; urgency=low
 
   * Add nose and pyfits to CI test dependencies
diff --git a/debian/patches/pyfits34_compat.patch b/debian/patches/pyfits34_compat.patch
new file mode 100644
index 0000000..b1180f4
--- /dev/null
+++ b/debian/patches/pyfits34_compat.patch
@@ -0,0 +1,32 @@
+Author: Ole Streicher <olebole at debian.org>
+Description: Compatibility patch for pyfits_3.4
+ Replace the removed `pyfits.CardList` by Python list
+--- a/lib/pywcs/core.py
++++ b/lib/pywcs/core.py
+@@ -528,7 +528,7 @@
+                                 comment='Coordinate increment along axis')
+             header.update('CDELT2', value=det2im.cdelt[1],
+                                 comment='Coordinate increment along axis')
+-            image.update_ext_version(int(hdulist[0].header['%s%d.EXTVER' % (d_kw, num)]))
++            image.ver = int(hdulist[0].header['%s%d.EXTVER' % (d_kw, num)])
+             hdulist.append(image)
+ 
+         write_d2i(1, self.det2im1)
+@@ -636,7 +636,7 @@
+                                 comment='Coordinate increment along axis')
+             header.update('CDELT2', value=cpdis.cdelt[1],
+                                 comment='Coordinate increment along axis')
+-            image.update_ext_version(int(hdulist[0].header['%s%d.EXTVER' % (d_kw, num)]))
++            image.ver = int(hdulist[0].header['%s%d.EXTVER' % (d_kw, num)])
+             hdulist.append(image)
+ 
+         write_dist(1, self.cpdis1)
+@@ -1220,7 +1220,7 @@
+ 
+         if self.wcs is not None:
+             header_string = self.wcs.to_header(relax)
+-            cards = pyfits.CardList()
++            cards = []
+             for i in range(0, len(header_string), 80):
+                 card_string = header_string[i:i+80]
+                 if pyfits.__version__[0] >= '3':
diff --git a/debian/patches/series b/debian/patches/series
index 66f3841..4b788d7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ pywcs-unbundle.patch
 use_stsci_distutils_hack.patch
 define_tabprm.patch
 update_tests.patch
+pyfits34_compat.patch

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



More information about the Debian-astro-commits mailing list