summaryrefslogtreecommitdiff
path: root/dev-python/pyfits
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/pyfits
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/pyfits')
-rw-r--r--dev-python/pyfits/Manifest9
-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/files/pyfits-3.2.1-unbundle-cfitsio.patch98
-rw-r--r--dev-python/pyfits/metadata.xml20
-rw-r--r--dev-python/pyfits/pyfits-3.3-r1.ebuild71
-rw-r--r--dev-python/pyfits/pyfits-3.4-r1.ebuild71
8 files changed, 512 insertions, 0 deletions
diff --git a/dev-python/pyfits/Manifest b/dev-python/pyfits/Manifest
new file mode 100644
index 000000000000..d53072781361
--- /dev/null
+++ b/dev-python/pyfits/Manifest
@@ -0,0 +1,9 @@
+AUX 01-system-cfitsio.patch 5038 BLAKE2B d6c48057f9efc207e68103d823ca07e0fdddf699451f8389274662b67eb7ac210577c0e9b28529f819f087352e7dc5b5ae7e7aba7f50954238c62ec7581f33f3 SHA512 25369aaf360742b432cd9ad4b4d83c3875dad3eb89daf70483f4dd6a187777a0493f94f365fea171f4adf493d2d5bfcb2223bb362a3fc8aface750c3d29af5b5
+AUX 02-numpy-deprecation-warning.patch 902 BLAKE2B 6f3bcb2c9738f9a24a4d5c1c53bae7cb8b447368320e46ef1958def84de4422f2160f4124d05266ec6177d3de5fc962f0c456c281788cf0322ec359ba2cbae5c SHA512 14123cd3ac5401fe29af59b4d03bc6b8cf2c3f17695cc4d34664298f0031748bc27ff52897e57032bd887743c9acda0c22af16b0a7362898d2d48984fe9c6a2a
+AUX 03-fix-for-cfitsio-3380.patch 1496 BLAKE2B bdacc85c1dd1ee28d7c84325646499f2c510e881e3641a0583d4fa56bc02dcedad6a743ad3b6265c664fd2c79804798bf66b4b626d03cbabfef1898e96c1596f SHA512 f3a842f0c9701233e49b22ba6fa8f672fa6374e025614e9c071ea3a54d01033c0f930fc7649cfd42abe65482927b70246762b9f59992790bccf17bc0ce3e0fdc
+AUX pyfits-3.2.1-unbundle-cfitsio.patch 2676 BLAKE2B 741df2cbceae943cda462db93d8d337e799ed77a4e5c6b214033ec8829da912d098c02e53e55071b9bf1344cacd2d44244fa1b5606a871ba3a42de97c7ffb85c SHA512 bea17130b7cb3f593ba8e24a699f4a2d58990ee4aace00117beb68498a56c662f90031a8843cb9b388e3dd757bf1efaf2596ba3a69bcc958e0a344e53d3c0675
+DIST pyfits-3.3.tar.gz 1646403 BLAKE2B 6d97198353c93e8d40545bba2677a9f3be5a810c68ddb8b6243debee82fc6ba256ed1a314a42a1c18eb4a2e037f191709bdf17fc08256256d797d7524c84a7f2 SHA512 561fe61050e61745054e0e4712c4413e129293b062d2020219b61d648d7093ce6952e1f26da955a1bf570f76ba7eddeb1805c99f679300b072ef6bacc2e4c90a
+DIST pyfits-3.4.tar.gz 1692414 BLAKE2B d3bcd3ce992c63e3a9e520c1bba56bd908590fddc0bfbb35941c7cdf8ff98c384bf5631fe86f8c6c8f292df9a38f299edde431d37a85dce0db1b869b92965bd7 SHA512 b569f871f26dcd9cb2fbe9d823d55c525e8101b0fcf83fff4bc3f3ec4bc7f680953a29634518ea19383f533f5e23b3703fffdb4e0d577b1023b4323254ef3a7e
+EBUILD pyfits-3.3-r1.ebuild 1872 BLAKE2B 32afe64d0aaa3c5ffdaac0ac559f0f367ce389686e254a6e723b5aa61fe69d5c01396967e13a2931c5ecf1f94917b4fad0e6c60b7756ac246929db6f484860c9 SHA512 fd1982762c5240caea18c0fc4230ddda4fc2b020ad13631a1e06506c3021e82a61411a94e567cae8298cf29e81a20f1b55fbfcb2d15c957c8d7c13b7327f7ab4
+EBUILD pyfits-3.4-r1.ebuild 1953 BLAKE2B 3ddbf7e4964f6dea87a69e3eda6f16e986ceb2807eebdf8f7ea90aa29fe8a87c5d7b2e173d8407742d472b67abcb40733ac5c51dcd106375fda90ca20dcb7672 SHA512 2cf6243926d07c1e4af1951afc9b33e566382aaa3390f9af8da1eebde59c172415af20926b8383d83894db09f88c5078b665787c407c3249e5ff9bcea603e5d3
+MISC metadata.xml 642 BLAKE2B 553c94afc0e02b2f208c2936603f49777405e08a99b45b254857a960c5d5a8ace8995941603a7069216a93ca2787f681f7a656f3028f987d576a344779eb01e3 SHA512 fd07a54d6f8273f7e16358da22be2f8484f74bacdeb78c35980046256800701b7fc53e7261074fb84651384f2e821ef3fbe62ba3674ca5fc6cd2fc176335da7c
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/files/pyfits-3.2.1-unbundle-cfitsio.patch b/dev-python/pyfits/files/pyfits-3.2.1-unbundle-cfitsio.patch
new file mode 100644
index 000000000000..a5d7e6217486
--- /dev/null
+++ b/dev-python/pyfits/files/pyfits-3.2.1-unbundle-cfitsio.patch
@@ -0,0 +1,98 @@
+--- setup.cfg.orig 2014-03-10 10:50:38.200531959 -0700
++++ setup.cfg 2014-03-10 10:52:19.288232002 -0700
+@@ -36,92 +36,12 @@
+
+ [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
+ src/compressionmodule.c
+ include_dirs =
+ numpy
+- cextern/cfitsio
+-extra_compile_args =
+- -Wno-declaration-after-statement
+- -Wno-unused-variable
+- -Wno-parentheses
+- -Wno-uninitialized
+- -Wno-format
+- -Wno-strict-prototypes
+- -Wno-unused
+- -Wno-comments
+- -Wno-switch
+-optional = True
++libraries =
++ cfitsio
++optional = False
+ fail_message =
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ Failed to build PyFITS tile compression support. PyFITS will still
diff --git a/dev-python/pyfits/metadata.xml b/dev-python/pyfits/metadata.xml
new file mode 100644
index 000000000000..4e1c8e2ff441
--- /dev/null
+++ b/dev-python/pyfits/metadata.xml
@@ -0,0 +1,20 @@
+<?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>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <longdescription lang="en">
+ PyFITS provides an interface to FITS formatted files under the
+ Python scripting language and PyRAF, the Python-based interface to
+ IRAF.
+</longdescription>
+ <upstream>
+ <remote-id type="pypi">pyfits</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/pyfits/pyfits-3.3-r1.ebuild b/dev-python/pyfits/pyfits-3.3-r1.ebuild
new file mode 100644
index 000000000000..b1f133fb4313
--- /dev/null
+++ b/dev-python/pyfits/pyfits-3.3-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5} )
+
+inherit distutils-r1 eutils multilib
+
+DESCRIPTION="Provides an interface to FITS formatted files under python"
+HOMEPAGE="http://www.stsci.edu/resources/software_hardware/pyfits"
+SRC_URI="mirror://pypi/p/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="doc test"
+
+RDEPEND="
+ dev-python/numpy[${PYTHON_USEDEP}]
+ sci-libs/cfitsio:0="
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/d2to1-0.2.5[${PYTHON_USEDEP}]
+ >=dev-python/stsci-distutils-0.3[${PYTHON_USEDEP}]
+ doc? (
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep 'dev-python/numpydoc[${PYTHON_USEDEP}]' 'python*')
+ dev-python/sphinxcontrib-programoutput[${PYTHON_USEDEP}]
+ dev-python/stsci-sphinxext[${PYTHON_USEDEP}]
+ )
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+
+PATCHES=( "${FILESDIR}"/${PN}-3.2.1-unbundle-cfitsio.patch )
+
+python_prepare_all() {
+ sed -i \
+ -e "s/\(hook_package_dir = \)lib/\1$(get_libdir)/g" \
+ "${S}"/setup.cfg || die
+
+ # https://github.com/spacetelescope/PyFITS/issues/95
+ sed \
+ -e "s/except UserWarning, w/except UserWarning as w/" \
+ -i lib/pyfits/scripts/fitscheck.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use doc && emake -C docs html
+}
+
+python_test() {
+ cd "${BUILD_DIR}"/lib* || die
+ nosetests --verbose || die
+}
+
+python_install() {
+ distutils-r1_python_install
+ local binary
+ for binary in "${ED}"/usr/bin/* "${D}$(python_get_scriptdir)"/*; do
+ einfo "Renaming ${binary} to ${binary}-${PN}"
+ mv ${binary}{,-${PN}} || die "failed renaming"
+ done
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/build/html/. )
+ DOCS=( FAQ.txt CHANGES.txt )
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/pyfits/pyfits-3.4-r1.ebuild b/dev-python/pyfits/pyfits-3.4-r1.ebuild
new file mode 100644
index 000000000000..beb1907949d4
--- /dev/null
+++ b/dev-python/pyfits/pyfits-3.4-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit distutils-r1 eutils multilib
+
+DESCRIPTION="Provides an interface to FITS formatted files under python"
+HOMEPAGE="http://www.stsci.edu/resources/software_hardware/pyfits"
+SRC_URI="mirror://pypi/p/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="doc test"
+
+RDEPEND="
+ dev-python/numpy[${PYTHON_USEDEP}]
+ sci-libs/cfitsio:0="
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/d2to1-0.2.5[${PYTHON_USEDEP}]
+ >=dev-python/stsci-distutils-0.3[${PYTHON_USEDEP}]
+ doc? (
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep 'dev-python/numpydoc[${PYTHON_USEDEP}]' 'python*')
+ dev-python/sphinxcontrib-programoutput[${PYTHON_USEDEP}]
+ dev-python/stsci-sphinxext[${PYTHON_USEDEP}]
+ )
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+
+PATCHES=( "${FILESDIR}"/01-system-cfitsio.patch
+ "${FILESDIR}"/02-numpy-deprecation-warning.patch
+ "${FILESDIR}"/03-fix-for-cfitsio-3380.patch )
+
+python_prepare_all() {
+ 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/" \
+ -i pyfits/scripts/fitscheck.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use doc && emake -C docs html
+}
+
+python_test() {
+ cd "${BUILD_DIR}"/lib* || die
+ nosetests --verbose || die
+}
+
+python_install() {
+ distutils-r1_python_install
+ local binary
+ for binary in "${ED}"/usr/bin/* "${D}$(python_get_scriptdir)"/*; do
+ einfo "Renaming ${binary} to ${binary}-${PN}"
+ mv ${binary}{,-${PN}} || die "failed renaming"
+ done
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/build/html/. )
+ DOCS=( FAQ.txt CHANGES.txt )
+ distutils-r1_python_install_all
+}