Commit 509112c2 authored by Ole Streicher's avatar Ole Streicher

New upstream version 2.1.10

parent 7099355a
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
......
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
......
......@@ -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
......
......@@ -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():
......
......@@ -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():
......
......@@ -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"
......
No preview for this file type
......@@ -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:
......
......@@ -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':
......
......@@ -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):
"""
......
[metadata]
name = stsci.tools
version = 3.3.0.dev
version = 3.4.1.dev
author = STScI
author-email = help@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
[metadata]
name = stsci.tools
version = 3.3.0.dev
version = 3.4.1.dev
author = STScI
author-email = help@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
[metadata]
name = pyraf
version = 2.1.9
version = 2.1.10
author = Rick White, Perry Greenfield, Chris Sontag
author-email = help@stsci.edu
home-page = http://www.stsci.edu/resources/software_hardware/pyraf
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment