diff options
author | sienkiew <sienkiew@stsci.edu> | 2013-01-11 17:16:00 -0500 |
---|---|---|
committer | sienkiew <sienkiew@stsci.edu> | 2013-01-11 17:16:00 -0500 |
commit | 5b61eb1ef2f7cb0bf4a074cecb2522e423c079b5 (patch) | |
tree | 5bfbc4ed74757a093eabbc7a46c3a40a445ffbac | |
parent | 773381ed1be1297cbce4ab7b0c28d32ccf3e0e79 (diff) | |
download | stwcs_hcf-5b61eb1ef2f7cb0bf4a074cecb2522e423c079b5.tar.gz |
new install
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@21558 fe389314-cf27-0410-b35b-8c050e845b92
-rw-r--r-- | defsetup.py | 21 | ||||
-rw-r--r-- | lib/stwcs/__init__.py | 20 | ||||
-rwxr-xr-x | new_setup.py | 35 | ||||
-rw-r--r-- | setup.cfg (renamed from new_setup.cfg) | 18 | ||||
-rwxr-xr-x[-rw-r--r--] | setup.py | 36 |
5 files changed, 47 insertions, 83 deletions
diff --git a/defsetup.py b/defsetup.py deleted file mode 100644 index ee830ae..0000000 --- a/defsetup.py +++ /dev/null @@ -1,21 +0,0 @@ -from __future__ import division # confidence high - -import sys - -pkg = ["stwcs", 'stwcs.updatewcs', 'stwcs.wcsutil', 'stwcs.distortion', 'stwcs.gui'] -pkg_gui = "stwcs/gui" - -setupargs = { - 'version' : "0.8", - 'description' : "Recomputes the WCS of an HST observation and puts all istortion corrections in the headers.", - 'package_dir': {'stwcs':'lib/stwcs', 'stwcs.updatewcs': 'lib/stwcs/updatewcs', 'stwcs.gui':'lib/stwcs/gui', - 'stwcs.wcsutil': 'lib/stwcs/wcsutil', 'stwcs.distortion': 'lib/stwcs/distortion'}, - 'data_files' : [( pkg_gui+"/pars", ['lib/stwcs/gui/pars/*']), - ( pkg_gui+"/htmlhelp", ['lib/stwcs/gui/htmlhelp/*.html']), - ( pkg_gui, ['lib/stwcs/gui/*.help'])], - 'author' : "Nadia Dencheva, Warren Hack", - 'author_email' : "help@stsci.edu", - 'license' : "http://www.stsci.edu/resources/software_hardware/pyraf/LICENSE", - 'platforms' : ["Linux","Solaris","Mac OS X", "Windows"], -} - diff --git a/lib/stwcs/__init__.py b/lib/stwcs/__init__.py index ef5d4c8..c10f119 100644 --- a/lib/stwcs/__init__.py +++ b/lib/stwcs/__init__.py @@ -24,25 +24,7 @@ from stsci.tools import teal __docformat__ = 'restructuredtext' -if False : - __version__ = '' - __svn_version = '' - __full_svn_info__ = '' - __setup_datetime__ = None - - try: - __version__ = __import__('pkg_resources').get_distribution('stwcs').version - except: - pass -else : - __version__ = '1.0.0' - - -try: - from stwcs.svninfo import (__svn_version__, __full_svn_info__, - __setup_datetime__) -except ImportError: - __svn_version__ = 'Unable to determine SVN revision' +from .version import * try: import gui diff --git a/new_setup.py b/new_setup.py deleted file mode 100755 index 30dc9b6..0000000 --- a/new_setup.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python - -try: - from setuptools import setup -except ImportError: - from distribute_setup import use_setuptools - use_setuptools() - from setuptools import setup - -try: - from stsci.distutils.command.easier_install import easier_install -except ImportError: - import os - import sys - stsci_distutils = os.path.abspath(os.path.join('..', 'distutils', 'lib')) - if os.path.exists(stsci_distutils) and stsci_distutils not in sys.path: - sys.path.append(stsci_distutils) - try: - from stsci.distutils.command.easier_install import easier_install - import setuptools.command.easy_install - except ImportError: - # If even this failed, we're not in an stsci_python source checkout, - # so there's nothing gained from using easier_install - from setuptools.command.easy_install import easy_install - easier_install = easy_install -# This is required so that easier_install can be used for setup_requires -import setuptools -setuptools.command.easy_install.easy_install = easier_install - -setup( - setup_requires=['d2to1>=0.2.5', 'stsci.distutils==0.2'], - d2to1=True, - use_2to3=True, - zip_safe=False -) diff --git a/new_setup.cfg b/setup.cfg index 8a9d2cb..8a5f528 100644 --- a/new_setup.cfg +++ b/setup.cfg @@ -18,8 +18,8 @@ classifier = Topic :: Software Development :: Libraries :: Python Modules requires-python = >=2.5 requires-dist = - stsci.tools (==3.0) - pywcs (>=1.10) + stsci.tools + pywcs [files] packages_root = lib @@ -29,11 +29,20 @@ packages = stwcs.updatewcs stwcs.wcsutil stwcs.gui -pacakge_data = - stwcs.gui = gui/pars/* gui/htmlhelp/*.html gui/*.help +data_files = + stwcs/gui = lib/stwcs/gui/*.help + stwcs/gui/pars = lib/stwcs/gui/pars/* + stwcs/gui/htmlhelp = lib/stwcs/gui/htmlhelp/* + +[install_data] +pre-hook.glob-data-files = stsci.distutils.hooks.glob_data_files [global] commands = stsci.distutils.command.easier_install.easier_install +setup_hooks = + stsci.distutils.hooks.tag_svn_revision + stsci.distutils.hooks.version_setup_hook + stsci.distutils.hooks.use_packages_root [sdist] pre-hook.svn-info = stsci.distutils.hooks.svn_info_pre_hook @@ -42,4 +51,3 @@ 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 - @@ -1,5 +1,35 @@ #!/usr/bin/env python -from __future__ import division # confidence high -import stsci.tools.stsci_distutils_hack as H -H.run() +try: + from setuptools import setup +except ImportError: + from distribute_setup import use_setuptools + use_setuptools() + from setuptools import setup + +try: + from stsci.distutils.command.easier_install import easier_install +except ImportError: + import os + import sys + stsci_distutils = os.path.abspath(os.path.join('..', 'distutils', 'lib')) + if os.path.exists(stsci_distutils) and stsci_distutils not in sys.path: + sys.path.append(stsci_distutils) + try: + from stsci.distutils.command.easier_install import easier_install + import setuptools.command.easy_install + except ImportError: + # If even this failed, we're not in an stsci_python source checkout, + # so there's nothing gained from using easier_install + from setuptools.command.easy_install import easy_install + easier_install = easy_install +# This is required so that easier_install can be used for setup_requires +import setuptools +setuptools.command.easy_install.easy_install = easier_install + +setup( + setup_requires=['d2to1>=0.2.5', 'stsci.distutils'], + d2to1=True, + use_2to3=True, + zip_safe=False +) |