summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2016-11-17 20:15:12 +0000
committerSébastien Fabbro <bicatali@gentoo.org>2016-11-17 20:15:12 +0000
commit5eaffd5066fca627b676845d14d7249e04ca7731 (patch)
treeb0fd2e484fca281f762b26502b8214ae9b6c40b0 /dev-python/pyfits
parentdev-python/healpy: version bump (diff)
downloadgentoo-5eaffd5066fca627b676845d14d7249e04ca7731.tar.gz
gentoo-5eaffd5066fca627b676845d14d7249e04ca7731.tar.bz2
gentoo-5eaffd5066fca627b676845d14d7249e04ca7731.zip
dev-python/pyfits: add several patches from debian, also fixing #596240
Package-Manager: portage-2.3.2
Diffstat (limited to 'dev-python/pyfits')
-rw-r--r--dev-python/pyfits/files/01-system-cfitsio.patch176
-rw-r--r--dev-python/pyfits/files/02-numpy-deprecation-warning.patch24
-rw-r--r--dev-python/pyfits/files/03-fix-for-cfitsio-3380.patch43
-rw-r--r--dev-python/pyfits/pyfits-3.4-r1.ebuild (renamed from dev-python/pyfits/pyfits-3.4.ebuild)11
4 files changed, 249 insertions, 5 deletions
diff --git a/dev-python/pyfits/files/01-system-cfitsio.patch b/dev-python/pyfits/files/01-system-cfitsio.patch
new file mode 100644
index 000000000000..f2ce935c7ea8
--- /dev/null
+++ b/dev-python/pyfits/files/01-system-cfitsio.patch
@@ -0,0 +1,176 @@
+From 70fe4dac3f68c3eed369d42e6a49e7865db8b250 Mon Sep 17 00:00:00 2001
+From: SVN-Git Migration <python-modules-team@lists.alioth.debian.org>
+Date: Thu, 8 Oct 2015 10:31:01 -0700
+Subject: 01-system-cfitsio.diff
+
+Patch-Name: 01-system-cfitsio.diff
+---
+ setup.cfg | 145 +++++++++++++++++++++++++++++++-------------------------------
+ 1 file changed, 73 insertions(+), 72 deletions(-)
+
+diff --git a/setup.cfg b/setup.cfg
+index 3a05c62..3a64f33 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -40,81 +40,81 @@ scripts =
+
+ [extension=pyfits.compression]
+ sources =
+- cextern/cfitsio/adler32.c
+- cextern/cfitsio/buffers.c
+- cextern/cfitsio/cfileio.c
+- cextern/cfitsio/checksum.c
+- cextern/cfitsio/crc32.c
+- cextern/cfitsio/deflate.c
+- cextern/cfitsio/drvrfile.c
+- cextern/cfitsio/drvrgsiftp.c
+- cextern/cfitsio/drvrmem.c
+- cextern/cfitsio/drvrnet.c
+- cextern/cfitsio/drvrsmem.c
+- cextern/cfitsio/editcol.c
+- cextern/cfitsio/edithdu.c
+- cextern/cfitsio/eval_f.c
+- cextern/cfitsio/eval_l.c
+- cextern/cfitsio/eval_y.c
+- cextern/cfitsio/fitscore.c
+- cextern/cfitsio/fits_hcompress.c
+- cextern/cfitsio/fits_hdecompress.c
+- cextern/cfitsio/getcolb.c
+- cextern/cfitsio/getcol.c
+- cextern/cfitsio/getcold.c
+- cextern/cfitsio/getcole.c
+- cextern/cfitsio/getcoli.c
+- cextern/cfitsio/getcolj.c
+- cextern/cfitsio/getcolk.c
+- cextern/cfitsio/getcoll.c
+- cextern/cfitsio/getcolsb.c
+- cextern/cfitsio/getcols.c
+- cextern/cfitsio/getcolui.c
+- cextern/cfitsio/getcoluj.c
+- cextern/cfitsio/getcoluk.c
+- cextern/cfitsio/getkey.c
+- cextern/cfitsio/group.c
+- cextern/cfitsio/grparser.c
+- cextern/cfitsio/histo.c
+- cextern/cfitsio/imcompress.c
+- cextern/cfitsio/infback.c
+- cextern/cfitsio/inffast.c
+- cextern/cfitsio/inflate.c
+- cextern/cfitsio/inftrees.c
+- cextern/cfitsio/iraffits.c
+- cextern/cfitsio/modkey.c
+- cextern/cfitsio/pliocomp.c
+- cextern/cfitsio/putcolb.c
+- cextern/cfitsio/putcol.c
+- cextern/cfitsio/putcold.c
+- cextern/cfitsio/putcole.c
+- cextern/cfitsio/putcoli.c
+- cextern/cfitsio/putcolj.c
+- cextern/cfitsio/putcolk.c
+- cextern/cfitsio/putcoll.c
+- cextern/cfitsio/putcolsb.c
+- cextern/cfitsio/putcols.c
+- cextern/cfitsio/putcolu.c
+- cextern/cfitsio/putcolui.c
+- cextern/cfitsio/putcoluj.c
+- cextern/cfitsio/putcoluk.c
+- cextern/cfitsio/putkey.c
+- cextern/cfitsio/quantize.c
+- cextern/cfitsio/region.c
+- cextern/cfitsio/ricecomp.c
+- cextern/cfitsio/scalnull.c
+- cextern/cfitsio/swapproc.c
+- cextern/cfitsio/trees.c
+- cextern/cfitsio/uncompr.c
+- cextern/cfitsio/wcssub.c
+- cextern/cfitsio/wcsutil.c
+- cextern/cfitsio/zcompress.c
+- cextern/cfitsio/zuncompress.c
+- cextern/cfitsio/zutil.c
++# cextern/cfitsio/adler32.c
++# cextern/cfitsio/buffers.c
++# cextern/cfitsio/cfileio.c
++# cextern/cfitsio/checksum.c
++# cextern/cfitsio/crc32.c
++# cextern/cfitsio/deflate.c
++# cextern/cfitsio/drvrfile.c
++# cextern/cfitsio/drvrgsiftp.c
++# cextern/cfitsio/drvrmem.c
++# cextern/cfitsio/drvrnet.c
++# cextern/cfitsio/drvrsmem.c
++# cextern/cfitsio/editcol.c
++# cextern/cfitsio/edithdu.c
++# cextern/cfitsio/eval_f.c
++# cextern/cfitsio/eval_l.c
++# cextern/cfitsio/eval_y.c
++# cextern/cfitsio/fitscore.c
++# cextern/cfitsio/fits_hcompress.c
++# cextern/cfitsio/fits_hdecompress.c
++# cextern/cfitsio/getcolb.c
++# cextern/cfitsio/getcol.c
++# cextern/cfitsio/getcold.c
++# cextern/cfitsio/getcole.c
++# cextern/cfitsio/getcoli.c
++# cextern/cfitsio/getcolj.c
++# cextern/cfitsio/getcolk.c
++# cextern/cfitsio/getcoll.c
++# cextern/cfitsio/getcolsb.c
++# cextern/cfitsio/getcols.c
++# cextern/cfitsio/getcolui.c
++# cextern/cfitsio/getcoluj.c
++# cextern/cfitsio/getcoluk.c
++# cextern/cfitsio/getkey.c
++# cextern/cfitsio/group.c
++# cextern/cfitsio/grparser.c
++# cextern/cfitsio/histo.c
++# cextern/cfitsio/imcompress.c
++# cextern/cfitsio/infback.c
++# cextern/cfitsio/inffast.c
++# cextern/cfitsio/inflate.c
++# cextern/cfitsio/inftrees.c
++# cextern/cfitsio/iraffits.c
++# cextern/cfitsio/modkey.c
++# cextern/cfitsio/pliocomp.c
++# cextern/cfitsio/putcolb.c
++# cextern/cfitsio/putcol.c
++# cextern/cfitsio/putcold.c
++# cextern/cfitsio/putcole.c
++# cextern/cfitsio/putcoli.c
++# cextern/cfitsio/putcolj.c
++# cextern/cfitsio/putcolk.c
++# cextern/cfitsio/putcoll.c
++# cextern/cfitsio/putcolsb.c
++# cextern/cfitsio/putcols.c
++# cextern/cfitsio/putcolu.c
++# cextern/cfitsio/putcolui.c
++# cextern/cfitsio/putcoluj.c
++# cextern/cfitsio/putcoluk.c
++# cextern/cfitsio/putkey.c
++# cextern/cfitsio/quantize.c
++# cextern/cfitsio/region.c
++# cextern/cfitsio/ricecomp.c
++# cextern/cfitsio/scalnull.c
++# cextern/cfitsio/swapproc.c
++# cextern/cfitsio/trees.c
++# cextern/cfitsio/uncompr.c
++# cextern/cfitsio/wcssub.c
++# cextern/cfitsio/wcsutil.c
++# cextern/cfitsio/zcompress.c
++# cextern/cfitsio/zuncompress.c
++# cextern/cfitsio/zutil.c
+ src/compressionmodule.c
+ include_dirs =
+ numpy
+- cextern/cfitsio
++# cextern/cfitsio
+ extra_compile_args =
+ -Wno-declaration-after-statement
+ -Wno-unused-variable
+@@ -125,6 +125,7 @@ extra_compile_args =
+ -Wno-unused
+ -Wno-comments
+ -Wno-switch
++libraries = cfitsio
+ optional = True
+ fail_message =
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
diff --git a/dev-python/pyfits/files/02-numpy-deprecation-warning.patch b/dev-python/pyfits/files/02-numpy-deprecation-warning.patch
new file mode 100644
index 000000000000..026e6b829d4d
--- /dev/null
+++ b/dev-python/pyfits/files/02-numpy-deprecation-warning.patch
@@ -0,0 +1,24 @@
+From 90cac05f8a5436a8dd3714ad29e2d81eb8b4d39b Mon Sep 17 00:00:00 2001
+From: Aurelien Jarno <aurelien@aurel32.net>
+Date: Tue, 2 Feb 2016 22:41:09 +0100
+Subject: Avoid DeprecationWarning from Numpy.
+
+Patch-Name: 02-numpy-deprecation-warning.diff
+---
+ pyfits/tests/test_division.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/pyfits/tests/test_division.py b/pyfits/tests/test_division.py
+index da4df72..aa93264 100644
+--- a/pyfits/tests/test_division.py
++++ b/pyfits/tests/test_division.py
+@@ -18,7 +18,8 @@ class TestDivisionFunctions(PyfitsTestCase):
+ a1 = np.rec.array(
+ s,
+ dtype=np.dtype([('c1', '>i4'), ('c2', '|S3'),
+- ('c3', '>f4'), ('c4', '|i1')]))
++ ('c3', '>f4'), ('c4', '|i1')]),
++ shape=len(s) // 12)
+
+ def test_card_with_continue(self):
+ h = fits.PrimaryHDU()
diff --git a/dev-python/pyfits/files/03-fix-for-cfitsio-3380.patch b/dev-python/pyfits/files/03-fix-for-cfitsio-3380.patch
new file mode 100644
index 000000000000..d0fac84d1e22
--- /dev/null
+++ b/dev-python/pyfits/files/03-fix-for-cfitsio-3380.patch
@@ -0,0 +1,43 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Update image tests for cfitsio 3.380
+ Make TFORMx check more flexible. The maximal column length in cfitsio
+ changed between version 3370 and 3380. This patch checks their syntax,
+ without a specific length.
+ .
+ HCOMPRESSed images are allowed to deviate from the original by about
+ 1/quantize_level of the RMS in each tile. This patch changes the absolute
+ identity test
+Bug: https://github.com/astropy/astropy/issues/4646
+Bug: https://github.com/astropy/astropy/issues/4647
+Bug-Debian: https://bugs.debian.org/816595
+--- a/pyfits/tests/test_image.py
++++ b/pyfits/tests/test_image.py
+@@ -2,6 +2,7 @@
+
+ import math
+ import os
++import re
+ import time
+ import warnings
+
+@@ -1014,7 +1015,7 @@
+ hdu.writeto(self.temp('test.fits'))
+
+ with fits.open(self.temp('test.fits')) as hdul:
+- assert (hdul['SCI'].data == cube).all()
++ assert np.abs(hdul['SCI'].data - cube).max() < 1./15.
+
+ def test_subtractive_dither_seed(self):
+ """
+@@ -1269,8 +1270,8 @@
+
+ with fits.open(self.temp('test.fits'),
+ disable_image_compression=True) as h:
+- assert h[1].header['TFORM1'] == '1PB(30)'
+- assert h[1].header['TFORM2'] == '1PB(359)'
++ assert re.match(r'^1PB\(\d+\)$', h[1].header['TFORM1'])
++ assert re.match(r'^1PB\(\d+\)$', h[1].header['TFORM2'])
+
+ def test_compression_update_header(self):
+ """Regression test for
+
diff --git a/dev-python/pyfits/pyfits-3.4.ebuild b/dev-python/pyfits/pyfits-3.4-r1.ebuild
index dd6036d52f28..a62069c9b4f8 100644
--- a/dev-python/pyfits/pyfits-3.4.ebuild
+++ b/dev-python/pyfits/pyfits-3.4-r1.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
+EAPI=6
PYTHON_COMPAT=( python2_7 python3_{4,5} )
@@ -32,12 +32,13 @@ DEPEND="${RDEPEND}
)
test? ( dev-python/nose[${PYTHON_USEDEP}] )"
-PATCHES=( "${FILESDIR}"/${PN}-3.2.1-unbundle-cfitsio.patch )
+PATCHES=( "${FILESDIR}"/01-system-cfitsio.patch
+ "${FILESDIR}"/02-numpy-deprecation-warning.patch
+ "${FILESDIR}"/03-fix-for-cfitsio-3380.patch )
python_prepare_all() {
- sed -i \
- -e "s/\(hook_package_dir = \)lib/\1$(get_libdir)/g" \
- "${S}"/setup.cfg || die
+ sed -e "s/\(hook_package_dir = \)lib/\1$(get_libdir)/g" \
+ -i "${S}"/setup.cfg || die
# https://github.com/spacetelescope/PyFITS/issues/95
sed -e "s/except UserWarning, w/except UserWarning as w/" \