summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2012-06-21 15:52:40 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2012-06-21 15:52:40 +0000
commitffa5ebb28209f67d5d11f24c72cb2560aab16187 (patch)
tree01e97169a8e5d993acada5f15af2553633e822c4 /dev-python/pyfits
parentStable for AMD64, wrt bug #422517 (diff)
downloadgentoo-2-ffa5ebb28209f67d5d11f24c72cb2560aab16187.tar.gz
gentoo-2-ffa5ebb28209f67d5d11f24c72cb2560aab16187.tar.bz2
gentoo-2-ffa5ebb28209f67d5d11f24c72cb2560aab16187.zip
Version bump wrt #422839 by Ian Delaney <johneed@hotmail.com> Debundle zlib, execute tests properly, drop old versions
(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/pyfits')
-rw-r--r--dev-python/pyfits/ChangeLog11
-rw-r--r--dev-python/pyfits/files/pyfits-3.0.4-tests_python3.patch118
-rw-r--r--dev-python/pyfits/files/pyfits-3.0.8-debundle_zlib.patch64
-rw-r--r--dev-python/pyfits/pyfits-3.0.7.ebuild42
-rw-r--r--dev-python/pyfits/pyfits-3.0.8.ebuild (renamed from dev-python/pyfits/pyfits-3.0.6.ebuild)21
5 files changed, 83 insertions, 173 deletions
diff --git a/dev-python/pyfits/ChangeLog b/dev-python/pyfits/ChangeLog
index c8435ec54ea7..a2791ca9268d 100644
--- a/dev-python/pyfits/ChangeLog
+++ b/dev-python/pyfits/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-python/pyfits
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pyfits/ChangeLog,v 1.31 2012/04/16 09:20:30 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pyfits/ChangeLog,v 1.32 2012/06/21 15:52:40 xarthisius Exp $
+
+*pyfits-3.0.8 (21 Jun 2012)
+
+ 21 Jun 2012; Kacper Kowalik <xarthisius@gentoo.org>
+ +files/pyfits-3.0.8-debundle_zlib.patch, +pyfits-3.0.8.ebuild,
+ -files/pyfits-3.0.4-tests_python3.patch, -pyfits-3.0.6.ebuild,
+ -pyfits-3.0.7.ebuild:
+ Version bump wrt #422839 by Ian Delaney <johneed@hotmail.com> Debundle zlib,
+ execute tests properly, drop old versions
*pyfits-3.0.7 (16 Apr 2012)
diff --git a/dev-python/pyfits/files/pyfits-3.0.4-tests_python3.patch b/dev-python/pyfits/files/pyfits-3.0.4-tests_python3.patch
deleted file mode 100644
index 0138d5798f9a..000000000000
--- a/dev-python/pyfits/files/pyfits-3.0.4-tests_python3.patch
+++ /dev/null
@@ -1,118 +0,0 @@
---- lib/pyfits/tests/test_division.py
-+++ lib/pyfits/tests/test_division.py
-@@ -1,7 +1,10 @@
- from __future__ import division # confidence high
- from __future__ import with_statement
-
--from cStringIO import StringIO
-+try:
-+ from cStringIO import StringIO
-+except:
-+ from io import StringIO
-
- import numpy as np
-
---- lib/pyfits/tests/test_structured.py
-+++ lib/pyfits/tests/test_structured.py
-@@ -65,8 +65,8 @@
- st['f1'] = [1, 3, 5]
- st['f2'] = ['hello', 'world', 'byebye']
- st['f3'] = np.random.random(st['f3'].shape)
-- print st.dtype.descr
-- print st
-+ print(st.dtype.descr)
-+ print(st)
-
- return st
-
-@@ -75,26 +75,26 @@
- def test_structured(self):
- fname = self.data('stddata.fits')
-
-- print 'Reading from ', fname
-+ print('Reading from ', fname)
- data1, h1 = pyfits.getdata(fname, ext=1, header=True)
- data2, h2 = pyfits.getdata(fname, ext=2, header=True)
-
- st = get_test_data()
-
- outfile = self.temp('test.fits')
-- print 'Writing to file data1:', outfile
-+ print('Writing to file data1:', outfile)
- pyfits.writeto(outfile, data1, clobber=True)
-- print 'Appending to file: data2', outfile
-+ print('Appending to file: data2', outfile)
- pyfits.append(outfile, data2)
-
-- print 'Appending to file: st', outfile
-+ print('Appending to file: st', outfile)
- pyfits.append(outfile, st)
-- print st.dtype.descr
-- print st
-+ print(st.dtype.descr)
-+ print(st)
- assert st.dtype.isnative
- assert np.all(st['f1'] == [1,3,5])
-
-- print 'Reading data back'
-+ print('Reading data back')
- data1check, h1check = pyfits.getdata(outfile, ext=1, header=True)
- data2check, h2check = pyfits.getdata(outfile, ext=2, header=True)
- stcheck, sthcheck = pyfits.getdata(outfile, ext=3, header=True)
-@@ -103,12 +103,12 @@
- raise ValueError('Fail')
- if not compare_arrays(data2, data2check, verbose=True):
- raise ValueError('Fail')
-- print st, stcheck
-+ print(st, stcheck)
- if not compare_arrays(st, stcheck, verbose=True):
- raise ValueError('Fail')
-
- # try reading with view
-- print 'Reading with ndarray view'
-+ print('Reading with ndarray view')
- dataviewcheck, hviewcheck = pyfits.getdata(outfile, ext=2, header=True,
- view=np.ndarray)
- if not compare_arrays(data2, dataviewcheck, verbose=True):
---- lib/pyfits/tests/test_table.py
-+++ lib/pyfits/tests/test_table.py
-@@ -51,7 +51,7 @@
- nfieldsa = len(a.dtype.names)
- nfieldsb = len(b.dtype.names)
- if nfieldsa != nfieldsb:
-- print "number of fields don't match"
-+ print("number of fields don't match")
- return False
- for i in range(nfieldsa):
- fielda = a.field(i)
-@@ -63,21 +63,21 @@
- if (type(fielda) != type(fieldb) and not
- (issubclass(type(fielda), type(fieldb)) or
- issubclass(type(fieldb), type(fielda)))):
-- print "type(fielda): ",type(fielda)," fielda: ",fielda
-- print "type(fieldb): ",type(fieldb)," fieldb: ",fieldb
-- print 'field %d type differs' % i
-+ print("type(fielda): ",type(fielda)," fielda: ",fielda)
-+ print("type(fieldb): ",type(fieldb)," fieldb: ",fieldb)
-+ print('field %d type differs' % i)
- return False
- if isinstance(fielda[0], np.floating):
- if not comparefloats(fielda, fieldb):
-- print "fielda: ",fielda
-- print "fieldb: ",fieldb
-- print 'field %d differs' % i
-+ print("fielda: ",fielda)
-+ print("fieldb: ",fieldb)
-+ print('field %d differs' % i)
- return False
- else:
- if np.any(fielda != fieldb):
-- print "fielda: ",fielda
-- print "fieldb: ",fieldb
-- print 'field %d differs' % i
-+ print("fielda: ",fielda)
-+ print("fieldb: ",fieldb)
-+ print('field %d differs' % i)
- return False
- return True
-
diff --git a/dev-python/pyfits/files/pyfits-3.0.8-debundle_zlib.patch b/dev-python/pyfits/files/pyfits-3.0.8-debundle_zlib.patch
new file mode 100644
index 000000000000..d1754e614bf2
--- /dev/null
+++ b/dev-python/pyfits/files/pyfits-3.0.8-debundle_zlib.patch
@@ -0,0 +1,64 @@
+Debundle zlib
+
+Patch written by Kacper Kowalik <xarthisius@gentoo.org>
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -43,10 +43,7 @@
+ src/compressionmodule.c
+ src/quantize.c
+ src/ricecomp.c
+- src/zlib.c
+- src/inffast.c
+- src/inftrees.c
+- src/trees.c
++libraries = z
+ include_dirs = numpy
+ extra_compile_args =
+ -Wno-unused-function
+--- a/src/compress.c
++++ b/src/compress.c
+@@ -106,7 +106,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include "zlib.h"
++#include <zlib.h>
+
+ int _pyfits_uncompress2mem_from_mem(
+ char *inmemptr,
+@@ -182,7 +182,7 @@
+ d_stream.next_out = uncompr;
+ d_stream.avail_out = uncomprLen;
+
+- err = _pyfits_inflate(&d_stream, Z_NO_FLUSH);
++ err = inflate(&d_stream, Z_NO_FLUSH);
+
+ if (err != Z_OK && err != Z_STREAM_END)
+ {
+@@ -217,7 +217,7 @@
+ *filesize = d_stream.total_out;
+
+ /* End the decompression */
+- err = _pyfits_inflateEnd(&d_stream);
++ err = inflateEnd(&d_stream);
+
+ /* free temporary output data buffer */
+ free(uncompr);
+@@ -285,7 +285,7 @@
+ c_stream.next_out = compr;
+ c_stream.avail_out = comprLen;
+
+- err = _pyfits_deflate(&c_stream, Z_FINISH);
++ err = deflate(&c_stream, Z_FINISH);
+
+ if (err != Z_OK && err != Z_STREAM_END)
+ {
+@@ -320,7 +320,7 @@
+ *filesize = c_stream.total_out;
+
+ /* End the compression */
+- err = _pyfits_deflateEnd(&c_stream);
++ err = deflateEnd(&c_stream);
+
+ /* free temporary output data buffer */
+ free(compr);
diff --git a/dev-python/pyfits/pyfits-3.0.7.ebuild b/dev-python/pyfits/pyfits-3.0.7.ebuild
deleted file mode 100644
index dc1715aa2f38..000000000000
--- a/dev-python/pyfits/pyfits-3.0.7.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pyfits/pyfits-3.0.7.ebuild,v 1.1 2012/04/16 09:20:30 xarthisius Exp $
-
-EAPI=4
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="2.4 2.5 2.7-pypy-*"
-
-inherit distutils eutils
-
-DESCRIPTION="Provides an interface to FITS formatted files under python"
-HOMEPAGE="http://www.stsci.edu/resources/software_hardware/pyfits http://pypi.python.org/pypi/pyfits"
-SRC_URI="mirror://pypi/p/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86 ~x86-fbsd"
-IUSE="test"
-
-RDEPEND="dev-python/numpy
- dev-python/setuptools"
-DEPEND="${RDEPEND}
- dev-python/stsci-distutils
- dev-python/d2to1
- test? ( dev-python/nose )"
-
-src_prepare() {
- sed -e 's/Exception, e/Exception as e/g' \
- -i lib/pyfits/{hdu/base.py,_release.py,tests/test_core.py} || die
- epatch "${FILESDIR}"/${PN}-3.0.4-tests_python3.patch
- distutils_src_prepare
-}
-
-src_test() {
- testing() {
- local t
- for t in lib/${PN}/tests/test_*.py; do
- PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib*)" "$(PYTHON)" "${t}" || die "${t} failed with Python ${PYTHON_ABI}"
- done
- }
- python_execute_function testing
-}
diff --git a/dev-python/pyfits/pyfits-3.0.6.ebuild b/dev-python/pyfits/pyfits-3.0.8.ebuild
index bff3a79745b6..ff4cb0d7ec49 100644
--- a/dev-python/pyfits/pyfits-3.0.6.ebuild
+++ b/dev-python/pyfits/pyfits-3.0.8.ebuild
@@ -1,10 +1,13 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pyfits/pyfits-3.0.6.ebuild,v 1.1 2012/03/07 18:55:10 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pyfits/pyfits-3.0.8.ebuild,v 1.1 2012/06/21 15:52:40 xarthisius Exp $
EAPI=4
+
+PYTHON_DEPEND="*:2.6"
SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="2.4 2.5 2.7-pypy-*"
+RESTRICT_PYTHON_ABIS="2.5 2.7-pypy-*"
+DISTUTILS_SRC_TEST=nosetests
inherit distutils eutils
@@ -15,28 +18,22 @@ SRC_URI="mirror://pypi/p/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~x86-fbsd"
-IUSE="test"
+IUSE=""
RDEPEND="dev-python/numpy
dev-python/setuptools"
DEPEND="${RDEPEND}
dev-python/stsci-distutils
- dev-python/d2to1
- test? ( dev-python/nose )"
+ dev-python/d2to1"
src_prepare() {
- sed -e 's/Exception, e/Exception as e/g' \
- -i lib/pyfits/{hdu/base.py,_release.py,tests/test_core.py} || die
- epatch "${FILESDIR}"/${PN}-3.0.4-tests_python3.patch
+ epatch "${FILESDIR}"/${P}-debundle_zlib.patch
distutils_src_prepare
}
src_test() {
testing() {
- local t
- for t in lib/${PN}/tests/test_*.py; do
- PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib*)" "$(PYTHON)" "${t}" || die "${t} failed with Python ${PYTHON_ABI}"
- done
+ nosetests -w "$(ls -d build-${PYTHON_ABI}/lib*)"
}
python_execute_function testing
}