From cb63cdde873bfaaeb2cc6b4189ac1d6398205711 Mon Sep 17 00:00:00 2001 From: sienkiew Date: Sat, 30 Jul 2011 22:45:45 +0000 Subject: temporarily revert to the old install system git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13423 fe389314-cf27-0410-b35b-8c050e845b92 --- defsetup.py | 18 ++++++++++++++++++ new_setup.cfg | 41 +++++++++++++++++++++++++++++++++++++++++ new_setup.py | 35 +++++++++++++++++++++++++++++++++++ setup.cfg | 41 ----------------------------------------- setup.py | 36 +++--------------------------------- 5 files changed, 97 insertions(+), 74 deletions(-) create mode 100644 defsetup.py create mode 100644 new_setup.cfg create mode 100755 new_setup.py delete mode 100644 setup.cfg mode change 100755 => 100644 setup.py diff --git a/defsetup.py b/defsetup.py new file mode 100644 index 0000000..9ea8cea --- /dev/null +++ b/defsetup.py @@ -0,0 +1,18 @@ +from __future__ import division # confidence high + +import sys + +pkg = ["stwcs", 'stwcs.updatewcs', 'stwcs.wcsutil', 'stwcs.distortion'] + +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.wcsutil': 'lib/stwcs/wcsutil', 'stwcs.distortion': 'lib/stwcs/distortion'}, + + '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/new_setup.cfg b/new_setup.cfg new file mode 100644 index 0000000..9e70d66 --- /dev/null +++ b/new_setup.cfg @@ -0,0 +1,41 @@ +[metadata] +name = stwcs +version = 0.9 +author = Nadia Dencheva, Warren Hack +author-email = help@stsci.edu +summary = Recomputes the WCS of an HST observation and puts all distortion + corrections in the headers +home-page = http://www.stsci.edu/resources/software_hardware/stsci_python +classifier = + Intended Audience :: Science/Research + License :: OSI Approved :: BSD License + Operating System :: OS Independent + Programming Language :: Python + Topic :: Scientific/Engineering :: Astronomy + Topic :: Software Development :: Libraries :: Python Modules +requires-python = >=2.5 +requires-dist = + stsci.tools (==3.0) + pywcs (>=1.10) + +[files] +packages_root = lib +packages = + stwcs + stwcs.distortion + stwcs.updatewcs + stwcs.wcsutil + +[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 = .. diff --git a/new_setup.py b/new_setup.py new file mode 100755 index 0000000..30dc9b6 --- /dev/null +++ b/new_setup.py @@ -0,0 +1,35 @@ +#!/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/setup.cfg b/setup.cfg deleted file mode 100644 index e179423..0000000 --- a/setup.cfg +++ /dev/null @@ -1,41 +0,0 @@ -[metadata] -name = stwcs -version = 0.9 -author = Nadia Dencheva, Warren Hack -author-email = help@stsci.edu -summary = Recomputes the WCS of an HST observation and puts all distortion - corrections in the headers -home-page = http://www.stsci.edu/resources/software_hardware/stsci_python -classifier = - Intended Audience :: Science/Research - License :: OSI Approved :: BSD License - Operating System :: OS Independent - Programming Language :: Python - Topic :: Scientific/Engineering :: Astronomy - Topic :: Software Development :: Libraries :: Python Modules -requires-python = >=2.5 -requires-dist = - stsci.tools (==3.0) - pywcs (>=1.10) - -[files] -packages_root = lib -packages = - stwcs - stwcs.distortion - stwcs.updatewcs - stwcs.wcsutil - -[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 = .. diff --git a/setup.py b/setup.py old mode 100755 new mode 100644 index 30dc9b6..ba1a2c0 --- a/setup.py +++ b/setup.py @@ -1,35 +1,5 @@ #!/usr/bin/env python +from __future__ import division # confidence high -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 -) +import stsci.tools.stsci_distutils_hack as H +H.run() -- cgit