dev-python/fitsio: initial import

Package-Manager: Portage-2.3.6, Repoman-2.3.2
This commit is contained in:
Sébastien Fabbro
2017-07-12 20:02:46 +00:00
parent a32a485450
commit 1fd35e3bd8
4 changed files with 100 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST fitsio-0.9.11.tar.gz 6020222 SHA256 a1196385ca7c42c93d9e53002d5ba574a8db452c3b53ef1189e2c150177d4266 SHA512 751b9612fe051f128d8f5dea61e2d119409293051a130ee3e18836181637e8c8daea757a715012fd024678d00e234e8b6c0cc0c9229c2bd9a406db312e4607d7 WHIRLPOOL b1baeef81675b089fc176d2c83766fc535e0fe5f1841b8ecf3b37ce8a336f05c9d61791fa5d7d010a115f300560ffe499eed291c12c3ed2633a2651de79f26e9

View File

@@ -0,0 +1,38 @@
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

View File

@@ -0,0 +1,40 @@
# 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
}

View File

@@ -0,0 +1,21 @@
<?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
thoughno joins or anything like that).
</longdescription>
<upstream>
<remote-id type="github">esheldon/fitsio</remote-id>
</upstream>
</pkgmetadata>