summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2017-07-12 20:02:46 +0000
committerSébastien Fabbro <bicatali@gentoo.org>2017-07-13 19:15:55 +0000
commit1fd35e3bd8d2038f42a5622a82ec4466a7338fd1 (patch)
treece5545e61267a92019a45cd2a79914ee5cd08884 /dev-python/fitsio
parentdev-db/postgresql: Disable Spinlocks on Alpha (diff)
downloadgentoo-1fd35e3bd8d2038f42a5622a82ec4466a7338fd1.tar.gz
gentoo-1fd35e3bd8d2038f42a5622a82ec4466a7338fd1.tar.bz2
gentoo-1fd35e3bd8d2038f42a5622a82ec4466a7338fd1.zip
dev-python/fitsio: initial import
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'dev-python/fitsio')
-rw-r--r--dev-python/fitsio/Manifest1
-rw-r--r--dev-python/fitsio/files/fitsio-0.9.11-test-failures.patch38
-rw-r--r--dev-python/fitsio/fitsio-0.9.11.ebuild40
-rw-r--r--dev-python/fitsio/metadata.xml21
4 files changed, 100 insertions, 0 deletions
diff --git a/dev-python/fitsio/Manifest b/dev-python/fitsio/Manifest
new file mode 100644
index 000000000000..211ba4147d06
--- /dev/null
+++ b/dev-python/fitsio/Manifest
@@ -0,0 +1 @@
+DIST fitsio-0.9.11.tar.gz 6020222 SHA256 a1196385ca7c42c93d9e53002d5ba574a8db452c3b53ef1189e2c150177d4266 SHA512 751b9612fe051f128d8f5dea61e2d119409293051a130ee3e18836181637e8c8daea757a715012fd024678d00e234e8b6c0cc0c9229c2bd9a406db312e4607d7 WHIRLPOOL b1baeef81675b089fc176d2c83766fc535e0fe5f1841b8ecf3b37ce8a336f05c9d61791fa5d7d010a115f300560ffe499eed291c12c3ed2633a2651de79f26e9
diff --git a/dev-python/fitsio/files/fitsio-0.9.11-test-failures.patch b/dev-python/fitsio/files/fitsio-0.9.11-test-failures.patch
new file mode 100644
index 000000000000..243913dc659e
--- /dev/null
+++ b/dev-python/fitsio/files/fitsio-0.9.11-test-failures.patch
@@ -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
diff --git a/dev-python/fitsio/fitsio-0.9.11.ebuild b/dev-python/fitsio/fitsio-0.9.11.ebuild
new file mode 100644
index 000000000000..cf3d78bf88dd
--- /dev/null
+++ b/dev-python/fitsio/fitsio-0.9.11.ebuild
@@ -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
+}
diff --git a/dev-python/fitsio/metadata.xml b/dev-python/fitsio/metadata.xml
new file mode 100644
index 000000000000..b7f5bc4ce9ac
--- /dev/null
+++ b/dev-python/fitsio/metadata.xml
@@ -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
+ though–no joins or anything like that).
+ </longdescription>
+ <upstream>
+ <remote-id type="github">esheldon/fitsio</remote-id>
+ </upstream>
+</pkgmetadata>