Source: pyscanfcs
Version: 0.2.3-2
Severity: wishlist
Tags: patch

Dear maintainer,

the package depends on the "python-pyfits" package which is obsolete
today and will not see any further development upstream. I am going to
create a bug against pyfits asking to remove it from Debian.

The "python-astropy" package is the designated successor and provides a
drop-in replacement for pyfits. The attached patch does the necessary
replacement.

Best regards

Ole

>From 3f4d5181a4ccfe42f50624ab801011991fa001d5 Mon Sep 17 00:00:00 2001
From: Ole Streicher <oleb...@debian.org>
Date: Sat, 12 Nov 2016 11:16:12 +0100
Subject: [PATCH] Use Astropy in place of Pyfits

---
 debian/control                                     |  2 +-
 .../patches/Use-Astropy-in-place-of-Pyfits.patch   | 74 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 76 insertions(+), 1 deletion(-)
 create mode 100644 debian/patches/Use-Astropy-in-place-of-Pyfits.patch
 create mode 100644 debian/patches/series

diff --git a/debian/control b/debian/control
index feb5349..8c53ad6 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Build-Depends: python-setuptools,
                python-matplotlib,
                python-multipletau,
                python-numpy,
-               python-pyfits,
+               python-astropy,
                python-scipy,
                python-wxgtk3.0,
                imagemagick,
diff --git a/debian/patches/Use-Astropy-in-place-of-Pyfits.patch b/debian/patches/Use-Astropy-in-place-of-Pyfits.patch
new file mode 100644
index 0000000..86306b5
--- /dev/null
+++ b/debian/patches/Use-Astropy-in-place-of-Pyfits.patch
@@ -0,0 +1,74 @@
+From: Ole Streicher <oleb...@debian.org>
+Date: Sat, 12 Nov 2016 11:14:23 +0100
+Subject: Use Astropy in place of Pyfits
+
+Pyfits is obsolete and will not get any upstream updates anymore. It is
+replaced by Astropy which provides a drop-in-replacement as astropy.io.fits.
+---
+ freeze_pyinstaller/debian_ubuntu_bundle_script.sh | 2 +-
+ pyscanfcs/doc.py                                  | 4 ++--
+ pyscanfcs/main.py                                 | 2 +-
+ setup.py                                          | 2 +-
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/freeze_pyinstaller/debian_ubuntu_bundle_script.sh b/freeze_pyinstaller/debian_ubuntu_bundle_script.sh
+index eaf835c..135b063 100755
+--- a/freeze_pyinstaller/debian_ubuntu_bundle_script.sh
++++ b/freeze_pyinstaller/debian_ubuntu_bundle_script.sh
+@@ -41,7 +41,7 @@ if ! [ -e $Env ]; then
+     # Pyinstaller
+     pip install git+git://github.com/pyinstaller/pyinstaller.git@779d07b236a943a4bf9d2b1a0ae3e0ebcc914798
+     # PyFITS
+-    pip install pyfits
++    pip install astropy
+ fi
+ source $Env"/bin/activate"
+ 
+diff --git a/pyscanfcs/doc.py b/pyscanfcs/doc.py
+index 86131b5..ce05cc3 100755
+--- a/pyscanfcs/doc.py
++++ b/pyscanfcs/doc.py
+@@ -25,7 +25,7 @@ import multipletau
+ import numpy
+ import os
+ import platform
+-import pyfits
++import astropy
+ import scipy
+ import sys
+ 
+@@ -143,7 +143,7 @@ def SoftwareUsed():
+            "\n - matplotlib "+matplotlib.__version__+\
+            "\n - multipletau "+multipletau.__version__+\
+            "\n - NumPy "+numpy.__version__+\
+-           "\n - PyFITS "+pyfits.__version__+\
++           "\n - Astropy "+astropy.__version__+\
+            "\n - SciPy "+scipy.__version__+\
+            "\n - uilayer "+uilayer.__version__+\
+            "\n - wxPython "+wx.__version__
+diff --git a/pyscanfcs/main.py b/pyscanfcs/main.py
+index 78c4f80..31e9da1 100755
+--- a/pyscanfcs/main.py
++++ b/pyscanfcs/main.py
+@@ -57,7 +57,7 @@ import matplotlib.pyplot as plt
+ import multipletau
+ 
+ import numpy as np                            # NumPy
+-import pyfits
++import astropy.io.fits as pyfits
+ from scipy.fftpack import fft
+ from scipy.fftpack import fftfreq
+ # SFCSnumeric needs scipy.optimize
+diff --git a/setup.py b/setup.py
+index 46a8709..baa6337 100644
+--- a/setup.py
++++ b/setup.py
+@@ -65,7 +65,7 @@ setup(
+         "matplotlib >= 1.1.0",
+         "multipletau >= 0.1.4",
+         "NumPy >= 1.5.1",
+-        "pyfits",
++        "astropy",
+         "SciPy >= 0.8.0",
+         "wxPython >= 2.8.10.1"
+         ],
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7b7c503
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+Use-Astropy-in-place-of-Pyfits.patch
-- 
2.10.2

Reply via email to