[Debian-astro-commits] [python-pyraf] 01/03: New upstream version 2.1.10

Ole Streicher olebole at moszumanska.debian.org
Tue Dec 1 10:34:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

olebole pushed a commit to branch debian
in repository python-pyraf.

commit 509112c280d12b10a5bd4f3774bc81c140c4473f
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Tue Dec 1 11:31:25 2015 +0100

    New upstream version 2.1.10
---
 PKG-INFO                                           |   2 +-
 lib/pyraf.egg-info/PKG-INFO                        |   2 +-
 lib/pyraf/version.py                               |  10 ++---
 lib/pyraf/version.py.orig1                         |   6 +--
 lib/pyraf/version.py.orig2                         |   6 +--
 lib/pyraf/wutil.py                                 |  41 +++++++++++----------
 lib/pyraf_setup.pyc                                | Bin 3313 -> 3313 bytes
 .../stsci.tools/lib/stsci/tools/capable.py         |  11 +++++-
 .../stsci.tools/lib/stsci/tools/iterfile.py        |   7 ++--
 .../stsci.tools/lib/stsci/tools/logutil.py         |  26 ++++++++++++-
 required_pkgs/stsci.tools/setup.cfg                |  17 +++++----
 required_pkgs/stsci.tools/setup.cfg.orig           |  17 +++++----
 setup.cfg                                          |   2 +-
 13 files changed, 91 insertions(+), 56 deletions(-)

diff --git a/PKG-INFO b/PKG-INFO
index 3457e99..0659b40 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyraf
-Version: 2.1.9
+Version: 2.1.10
 Summary: Provides a Pythonic interface to IRAF that can be used in place of the existing IRAF CL
 Home-page: http://www.stsci.edu/resources/software_hardware/pyraf
 Author: Rick White, Perry Greenfield, Chris Sontag
diff --git a/lib/pyraf.egg-info/PKG-INFO b/lib/pyraf.egg-info/PKG-INFO
index 3457e99..0659b40 100644
--- a/lib/pyraf.egg-info/PKG-INFO
+++ b/lib/pyraf.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyraf
-Version: 2.1.9
+Version: 2.1.10
 Summary: Provides a Pythonic interface to IRAF that can be used in place of the existing IRAF CL
 Home-page: http://www.stsci.edu/resources/software_hardware/pyraf
 Author: Rick White, Perry Greenfield, Chris Sontag
diff --git a/lib/pyraf/version.py b/lib/pyraf/version.py
index 147bfcd..6dda7c4 100644
--- a/lib/pyraf/version.py
+++ b/lib/pyraf/version.py
@@ -7,14 +7,14 @@ __all__ = ['__version__', '__vdate__', '__svn_revision__', '__svn_full_info__',
 
 import datetime
 
-__version__ = '2.1.9'
+__version__ = '2.1.10'
 __vdate__ = 'unspecified'
-__svn_revision__ = "2466"
+__svn_revision__ = "2486"
 __svn_full_info__ = 'unknown'
-__setup_datetime__ = datetime.datetime(2015, 10, 16, 15, 42, 59, 163340)
+__setup_datetime__ = datetime.datetime(2015, 11, 25, 13, 40, 1, 566121)
 
 # what version of stsci.distutils created this version.py
-stsci_distutils_version = '0.3.8.dev'
+stsci_distutils_version = '0.3.7'
 
 if '.dev' in __version__:
     def update_svn_info():
@@ -70,7 +70,7 @@ if '.dev' in __version__:
                 if pipe.returncode == 0:
                     stdout = stdout.decode('latin1').strip()
                     if stdout and stdout[0] in string.digits:
-                        __svn_revision__ = "2466"
+                        __svn_revision__ = "2486"
             except OSError:
                 pass
 
diff --git a/lib/pyraf/version.py.orig1 b/lib/pyraf/version.py.orig1
index 0ed32e1..e4ea356 100644
--- a/lib/pyraf/version.py.orig1
+++ b/lib/pyraf/version.py.orig1
@@ -7,14 +7,14 @@ __all__ = ['__version__', '__vdate__', '__svn_revision__', '__svn_full_info__',
 
 import datetime
 
-__version__ = '2.1.9'
+__version__ = '2.1.10'
 __vdate__ = 'unspecified'
 __svn_revision__ = 'Unable to determine SVN revision'
 __svn_full_info__ = 'unknown'
-__setup_datetime__ = datetime.datetime(2015, 10, 16, 15, 42, 49, 779683)
+__setup_datetime__ = datetime.datetime(2015, 11, 25, 13, 39, 51, 97188)
 
 # what version of stsci.distutils created this version.py
-stsci_distutils_version = '0.3.8.dev'
+stsci_distutils_version = '0.3.7'
 
 if '.dev' in __version__:
     def update_svn_info():
diff --git a/lib/pyraf/version.py.orig2 b/lib/pyraf/version.py.orig2
index 34c272b..2ec7b7a 100644
--- a/lib/pyraf/version.py.orig2
+++ b/lib/pyraf/version.py.orig2
@@ -7,14 +7,14 @@ __all__ = ['__version__', '__vdate__', '__svn_revision__', '__svn_full_info__',
 
 import datetime
 
-__version__ = '2.1.9'
+__version__ = '2.1.10'
 __vdate__ = 'unspecified'
 __svn_revision__ = 'Unable to determine SVN revision'
 __svn_full_info__ = 'unknown'
-__setup_datetime__ = datetime.datetime(2015, 10, 16, 15, 42, 49, 779683)
+__setup_datetime__ = datetime.datetime(2015, 11, 25, 13, 39, 51, 97188)
 
 # what version of stsci.distutils created this version.py
-stsci_distutils_version = '0.3.8.dev'
+stsci_distutils_version = '0.3.7'
 
 if '.dev' in __version__:
     def update_svn_info():
diff --git a/lib/pyraf/wutil.py b/lib/pyraf/wutil.py
index d67e08a..a401431 100644
--- a/lib/pyraf/wutil.py
+++ b/lib/pyraf/wutil.py
@@ -4,7 +4,7 @@ These are python stubs that are overloaded by a c version implementations.
 If the c versions do not exist, then these routines will do nothing
 
 
-$Id: wutil.py 2451 2015-10-05 14:15:45Z sontag $
+$Id: wutil.py 2484 2015-11-24 20:40:57Z sontag $
 """
 from __future__ import division # confidence high
 
@@ -46,13 +46,8 @@ WUTIL_USING_X = not WUTIL_ON_WIN
 # More on this for OSX: for now we support both versions (X or Aqua) on OSX
 # Allow environment variable so any user can force their preference.
 if WUTIL_ON_MAC and not _skipDisplay:
-    if 'PYRAF_WUTIL_USING_AQUA' in os.environ:
-        WUTIL_USING_X = False
-    elif 'PYRAF_WUTIL_USING_X' in os.environ:
-        WUTIL_USING_X = True
-    else:
-        # Otherwise check for them; look at the python binaries - are they X11-linked?
-        WUTIL_USING_X = capable.is_darwin_and_x()
+    # default to aqua as it is the 98% case now (post v2.1.9), X11 users will need the env. var
+    WUTIL_USING_X = 'PYRAF_WUTIL_USING_X' in os.environ
 
 # Experimental new (2012) mode some have requested (OSX mostly) where all
 # graphics windows drawn are popped to the foreground and left there with
@@ -99,7 +94,7 @@ try:
             except:
                 _has_aqutil = 0
                 print "Could not import aqutil, please see the online PyRAF FAQ"
-                print "http://www.stsci.edu/institute/software_hardware/pyraf/pyraf_faq#5.13"
+                print "http://www.stsci.edu/institute/software_hardware/pyraf/pyraf_faq#2.6"
 
 except ImportError:
     _has_xutil = 0 # Unsuccessful init of XWindow
@@ -536,12 +531,15 @@ def dumpspecs(outstream = None, skip_volatiles = False):
         out += "\nWUTIL_ON_MAC = "+str(WUTIL_ON_MAC)
         out += "\nWUTIL_ON_WIN = "+str(WUTIL_ON_WIN)
         out += "\nWUTIL_USING_X = "+str(WUTIL_USING_X)
-        out += "\nis_darwin_and_x = "+str(capable.is_darwin_and_x())
-        if WUTIL_ON_MAC:
-            out += "\nwhich_darwin_linkage = "+str(capable.which_darwin_linkage())
-            out += "\nwhich_darwin_linkage2 = "+str(capable.which_darwin_linkage(force_otool_check=True))
-        else:
-            out += "\nwhich_darwin_linkage = (not darwin)"
+        try: # the try/except handling here will be unneccessary after stsci.tools 3.4.2
+            out += "\nis_darwin_and_x = "+str(capable.is_darwin_and_x())
+            if WUTIL_ON_MAC:
+                out += "\nwhich_darwin_linkage = "+str(capable.which_darwin_linkage())
+                out += "\nwhich_darwin_linkage2 = "+str(capable.which_darwin_linkage(force_otool_check=True))
+            else:
+                out += "\nwhich_darwin_linkage = (not darwin)"
+        except Exception:
+            out += "\ndarwin linkage check threw exception"
         out += "\nskip display = "+str(_skipDisplay)
         out += "\nhas graphics = "+str(hasGraphics)
         out += "\nimported aqutil = "+str(bool(_has_aqutil))
@@ -604,15 +602,18 @@ if _skipDisplay:
 else:
     if _has_xutil or _has_aqutil:
         hasGraphics = focusController.hasGraphics
-    elif WUTIL_ON_MAC:
+    elif WUTIL_ON_MAC: # on a Mac but loaded no graphcs libs (aqutil/xutil)
         # Handle case where we are on the Mac with no X and no PyObjc.  We can
         # still run, albeit without automatic mouse moving and focus jumping.
         hasGraphics = focusController.hasGraphics
         if hasGraphics:
-            if capable.which_darwin_linkage() == 'aqua':
-                print "\nLimited graphics available on OSX (aqutil not loaded)\n"
-            else:
-                print "\nLimited graphics available on OSX (xutil not loaded)\n"
+            try: # the try/except handling here will be unneccessary after stsci.tools 3.4.2
+                if capable.which_darwin_linkage() == 'aqua':
+                    print "\nLimited graphics available on OSX (aqutil not loaded)\n"
+                else:
+                    print "\nLimited graphics available on OSX (xutil not loaded)\n"
+            except Exception:
+                print "\nLimited graphics available on OSX (library not loaded)\n"
     elif WUTIL_ON_WIN:
         hasGraphics = 1 # try this, tho VERY limited (epar only I guess)
         print "\nLimited graphics available on win32 platform\n"
diff --git a/lib/pyraf_setup.pyc b/lib/pyraf_setup.pyc
index 1e51b52..269038b 100644
Binary files a/lib/pyraf_setup.pyc and b/lib/pyraf_setup.pyc differ
diff --git a/required_pkgs/stsci.tools/lib/stsci/tools/capable.py b/required_pkgs/stsci.tools/lib/stsci/tools/capable.py
index bab6ef0..258cc3e 100644
--- a/required_pkgs/stsci.tools/lib/stsci/tools/capable.py
+++ b/required_pkgs/stsci.tools/lib/stsci/tools/capable.py
@@ -3,7 +3,7 @@ This is meant to be fast and light, having no complicated dependencies, so
 that any module can fearlessly import this without adverse affects or
 performance concerns.
 
-$Id: capable.py 44899 2015-09-28 22:23:37Z sontag $
+$Id: capable.py 46455 2015-11-24 20:46:40Z sontag $
 """
 
 from __future__ import division # confidence high
@@ -71,7 +71,14 @@ def which_darwin_linkage(force_otool_check=False):
     else:
         import Tkinter
     import subprocess
-    libs = subprocess.check_output(('/usr/bin/otool', '-L', Tkinter._tkinter.__file__)).decode('ascii')
+    try:
+        tk_dyn_lib = Tkinter._tkinter.__file__
+    except AttributeError: # happens on Ureka
+        if 'UR_DIR' in os.environ:
+            return 'aqua'
+        else:
+            return 'unknown'
+    libs = subprocess.check_output(('/usr/bin/otool', '-L', tk_dyn_lib)).decode('ascii')
     if libs.find('/libX11.') >= 0:
         return "x11"
     else:
diff --git a/required_pkgs/stsci.tools/lib/stsci/tools/iterfile.py b/required_pkgs/stsci.tools/lib/stsci/tools/iterfile.py
index 4a99160..f2a8427 100644
--- a/required_pkgs/stsci.tools/lib/stsci/tools/iterfile.py
+++ b/required_pkgs/stsci.tools/lib/stsci/tools/iterfile.py
@@ -83,20 +83,21 @@ class IterFitsFile(object):
             self.handle.close()
         self.handle = None
 
-    def __getslice__(self,i,j):
+    def __getitem__(self,i):
         """ Returns a PyFITS section for the rows specified. """
         # All I/O must be done here, starting with open
         hdu = self.open()
         if self.inmemory or self.compress:
-            _data = hdu.data[i:j,:]
+            _data = hdu.data[i,:]
         else:
-            _data = hdu.section[i:j,:]
+            _data = hdu.section[i,:]
 
         if not self.inmemory:
             self.close()
             del hdu
 
         return _data
+        
 
     def __getattribute__(self,name):
         if name == 'data':
diff --git a/required_pkgs/stsci.tools/lib/stsci/tools/logutil.py b/required_pkgs/stsci.tools/lib/stsci/tools/logutil.py
index 479bf92..11bc953 100644
--- a/required_pkgs/stsci.tools/lib/stsci/tools/logutil.py
+++ b/required_pkgs/stsci.tools/lib/stsci/tools/logutil.py
@@ -117,7 +117,7 @@ if not PY3K:
 else:
     import builtins
     def global_logging_raw_input(prompt):
-        retval = builtins._original_raw_input(prompt)
+        retval = builtins._original_raw_input(prompt)        
         if isinstance(sys.stdout, StreamTeeLogger):
             sys.stdout.log_orig(str(prompt) + retval, echo=False)
         return retval
@@ -178,6 +178,30 @@ class StreamTeeLogger(logging.Logger):
         self.set_stream(stream)
 
         self.addHandler(_LogTeeHandler())
+        #self.errors = 'strict'
+        #self.encoding = 'utf8'
+
+    @property
+    def encoding(self):
+        if self.stream:
+            try:
+                return self.stream.encoding
+            except AttributeError:
+                pass
+
+        # Default value
+        return 'utf-8'
+
+    @property
+    def errors(self):
+        if self.stream:
+            try:
+                return self.stream.errors
+            except AttributeError:
+                pass
+
+        # Default value
+        return 'strict'
 
     def set_stream(self, stream):
         """
diff --git a/required_pkgs/stsci.tools/setup.cfg b/required_pkgs/stsci.tools/setup.cfg
index fe63a15..3e43501 100644
--- a/required_pkgs/stsci.tools/setup.cfg
+++ b/required_pkgs/stsci.tools/setup.cfg
@@ -1,10 +1,10 @@
 [metadata]
 name = stsci.tools
-version = 3.3.0.dev
+version = 3.4.1.dev
 author = STScI
 author-email = help at stsci.edu
 home-page = http://www.stsci.edu/resources/software_hardware/stsci_python
-classifier =
+classifier = 
 	Intended Audience :: Science/Research
 	License :: OSI Approved :: BSD License
 	Operating System :: OS Independent
@@ -12,7 +12,7 @@ classifier =
 	Topic :: Scientific/Engineering :: Astronomy
 	Topic :: Software Development :: Libraries :: Python Modules
 requires-python = >=2.6
-requires-dist =
+requires-dist = 
 	d2to1
 	setuptools
 	stsci.distutils
@@ -20,13 +20,13 @@ requires-dist =
 
 [files]
 packages_root = lib
-packages =
+packages = 
 	stsci
 	stsci.tools
 	stsci.tools.tests
-package_data =
+package_data = 
 	stsci.tools.tests = *.fits
-scripts =
+scripts = 
 	scripts/convertwaiveredfits
 	scripts/stscidocs
 
@@ -34,11 +34,12 @@ scripts =
 exclude = .*(testutil|tester)
 
 [global]
-setup_hooks =
+setup_hooks = 
 	stsci.distutils.hooks.use_packages_root
 	stsci.distutils.hooks.tag_svn_revision
 	stsci.distutils.hooks.version_setup_hook
 
 [backwards_compat]
-use_2to3 = True
+use_2to3 = False
 zip_safe = False
+
diff --git a/required_pkgs/stsci.tools/setup.cfg.orig b/required_pkgs/stsci.tools/setup.cfg.orig
index af7c25d..a093d60 100644
--- a/required_pkgs/stsci.tools/setup.cfg.orig
+++ b/required_pkgs/stsci.tools/setup.cfg.orig
@@ -1,10 +1,10 @@
 [metadata]
 name = stsci.tools
-version = 3.3.0.dev
+version = 3.4.1.dev
 author = STScI
 author-email = help at stsci.edu
 home-page = http://www.stsci.edu/resources/software_hardware/stsci_python
-classifier =
+classifier = 
 	Intended Audience :: Science/Research
 	License :: OSI Approved :: BSD License
 	Operating System :: OS Independent
@@ -12,7 +12,7 @@ classifier =
 	Topic :: Scientific/Engineering :: Astronomy
 	Topic :: Software Development :: Libraries :: Python Modules
 requires-python = >=2.6
-requires-dist =
+requires-dist = 
 	d2to1
 	setuptools
 	stsci.distutils
@@ -21,13 +21,13 @@ requires-dist =
 
 [files]
 packages_root = lib
-packages =
+packages = 
 	stsci
 	stsci.tools
 	stsci.tools.tests
-package_data =
+package_data = 
 	stsci.tools.tests = *.fits
-scripts =
+scripts = 
 	scripts/convertwaiveredfits
 	scripts/stscidocs
 
@@ -35,11 +35,12 @@ scripts =
 exclude = .*(testutil|tester)
 
 [global]
-setup_hooks =
+setup_hooks = 
 	stsci.distutils.hooks.use_packages_root
 	stsci.distutils.hooks.tag_svn_revision
 	stsci.distutils.hooks.version_setup_hook
 
 [backwards_compat]
-use_2to3 = True
+use_2to3 = False
 zip_safe = False
+
diff --git a/setup.cfg b/setup.cfg
index 1024db8..7caf01c 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
 [metadata]
 name = pyraf
-version = 2.1.9
+version = 2.1.10
 author = Rick White, Perry Greenfield, Chris Sontag
 author-email = help at stsci.edu
 home-page = http://www.stsci.edu/resources/software_hardware/pyraf

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/python-pyraf.git



More information about the Debian-astro-commits mailing list