--- /dev/null
+From: Ole Streicher <olebole@debian.org>
+Date: Fri, 15 Jul 2016 08:46:15 +0200
+Subject: Mark failures that are known to fail with the original cfitsio
+
+---
+ fitsio/test.py | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/fitsio/test.py b/fitsio/test.py
+index bafde15..49a4b3b 100644
+--- a/fitsio/test.py
++++ b/fitsio/test.py
+@@ -545,7 +545,7 @@ class TestReadWrite(unittest.TestCase):
+ try:
+ with fitsio.FITS(fname,'rw',clobber=True) as fits:
+ # note i8 not supported for compressed!
+- dtypes = ['u1','i1','u2','i2','u4','i4','f4','f8']
++ dtypes = ['u1','i1', 'i2','u4','i4','f4','f8']
+
+ for dtype in dtypes:
+ data = numpy.arange(5*20,dtype=dtype).reshape(5,20)
+@@ -569,7 +569,7 @@ class TestReadWrite(unittest.TestCase):
+ try:
+ with fitsio.FITS(fname,'rw',clobber=True) as fits:
+ # note i8 not supported for compressed!
+- dtypes = ['u1','i1','u2','i2','u4','i4','f4','f8']
++ dtypes = ['u1','i1', 'i2','u4','i4','f4','f8']
+
+ for dtype in dtypes:
+ data = numpy.arange(5*20,dtype=dtype).reshape(5,20)
+@@ -1365,6 +1365,7 @@ class TestReadWrite(unittest.TestCase):
+ if os.path.exists(fname):
+ os.remove(fname)
+
++ @unittest.skip("bzip2 is not supported with debian cfitsio package")
+ def testBz2Read(self):
+ '''
+ Write a normal .fits file, run bzip2 on it, then read the bz2
--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{5,6} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python library to read from and write to FITS files"
+HOMEPAGE="https://github.com/esheldon/fitsio"
+SRC_URI="https://github.com/esheldon/fitsio/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ >=dev-python/numpy-1.11[${PYTHON_USEDEP}]
+ sci-libs/cfitsio:0=
+"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+"
+
+PATCHES=( "${FILESDIR}"/${P}-test-failures.patch )
+
+python_prepare_all() {
+ sed -e '/self.use_system_fitsio/s/False/True/' \
+ -i setup.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ distutils_install_for_testing
+ pushd "${TEST_DIR}"/ || die
+ ${PYTHON} -c "import fitsio; exit(fitsio.test.test())" || die
+ popd > /dev/null || die
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Fitsio provides an easy to use object-oriented API including
+ providing a Numpy interface to FITS files read from CFITSIO. It
+ allows direct access to the columns of a FITS binary table which can
+ be useful for reading large fits files. Compared to astropy.io.fits,
+ this package is closer to the underlying cfitsio library.
+ Fitsio also exposes a microlanguage (implemented in CFITSIO) for
+ making efficient SQL-like queries of tables (single tables only
+ though–no joins or anything like that).
+ </longdescription>
+ <upstream>
+ <remote-id type="github">esheldon/fitsio</remote-id>
+ </upstream>
+</pkgmetadata>