diff options
author | embray <embray@stsci.edu> | 2011-07-07 12:38:53 -0400 |
---|---|---|
committer | embray <embray@stsci.edu> | 2011-07-07 12:38:53 -0400 |
commit | ebc288f142741cf8863c1d520350d618753a7f30 (patch) | |
tree | 412c4823a9d811009dcb1cc060184ed557bb3ec4 | |
parent | 433054acfc0593f83bd8ee650ac7ceb991e3c5e8 (diff) | |
download | stwcs_hcf-ebc288f142741cf8863c1d520350d618753a7f30.tar.gz |
Updated packages to use the svn_info hooks, and to get their version numbers from pkg_resources. I only did this with packages that were already using __svn_version__, __full_svn_info__, etc. to begin with.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13327 fe389314-cf27-0410-b35b-8c050e845b92
-rw-r--r-- | lib/stwcs/__init__.py | 36 | ||||
-rw-r--r-- | setup.cfg | 8 |
2 files changed, 33 insertions, 11 deletions
diff --git a/lib/stwcs/__init__.py b/lib/stwcs/__init__.py index a32f8b9..120608f 100644 --- a/lib/stwcs/__init__.py +++ b/lib/stwcs/__init__.py @@ -1,12 +1,17 @@ """ STWCS -This package provides support for WCS based distortion models and coordinate -transformation. It relies on PyWCS (based on WCSLIB). It consists of two subpackages: -updatewcs and wcsutil. Updatewcs performs corrections to the basic WCS and includes -other distortion infomation in the science files as header keywords or file extensions. -Wcsutil provides an HSTWCS object which extends pywcs.WCS object and provides HST instrument -specific information as well as methods for coordinate tarnsformaiton. Wcsutil also provides -functions for manipulating alternate WCS descriptions in the headers. +This package provides support for WCS based distortion models and coordinate +transformation. It relies on PyWCS (based on WCSLIB). It consists of two +subpackages: updatewcs and wcsutil. + +updatewcs performs corrections to the +basic WCS and includes other distortion infomation in the science files as +header keywords or file extensions. + +Wcsutil provides an HSTWCS object which extends pywcs.WCS object and provides +HST instrument specific information as well as methods for coordinate +transformation. wcsutil also provides functions for manipulating alternate WCS +descriptions in the headers. """ from __future__ import division # confidence high @@ -20,10 +25,19 @@ __docformat__ = 'restructuredtext' DEGTORAD = fileutil.DEGTORAD RADTODEG = fileutil.RADTODEG -__version__ = '0.8' + +__version__ = '' +__svn_version = '' +__full_svn_info__ = '' +__setup_datetime__ = None + +try: + __version__ = __import__('pkg_resources').get_distribution('stwcs').version +except: + pass try: - import svn_version - __svn_version__ = svn_version.__svn_version__ + from stwcs.svninfo import (__svn_version__, __full_svn_info__, + __setup_datetime__) except ImportError: - __svn_version__ = 'Unable to determine SVN revision'
\ No newline at end of file + __svn_version__ = 'Unable to determine SVN revision' @@ -29,5 +29,13 @@ packages = [global] commands = stsci.distutils.command.easier_install.easier_install +[sdist] +pre-hook.svn-info = stsci.distutils.hooks.svn_info_pre_hook +post-hook.svn-info = stsci.distutils.hooks.svn_info_post_hook + +[build_py] +pre-hook.svn-info = stsci.distutils.hooks.svn_info_pre_hook +post-hook.svn-info = stsci.distutils.hooks.svn_info_post_hook + [easy_install] find-links = .. |