summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorembray <embray@stsci.edu>2011-06-22 19:24:07 -0400
committerembray <embray@stsci.edu>2011-06-22 19:24:07 -0400
commitd93a10017d62f39d80167b45c1044a5e113f5994 (patch)
tree07967ea82a8550f8a8423bbe30046e798cf6c98e /setup.py
parent708b4f32ac133fdb6157ec6e243dc76e32f9a84b (diff)
downloadstwcs_hcf-d93a10017d62f39d80167b45c1044a5e113f5994.tar.gz
Redoing the r13221-13223 merge in the actual trunk now. This updates trunk to the setup_refactoring branch (however, coords, pysynphot, and pywcs are still being pulled from the astrolib setup_refactoring branch. Will have to do that separately then update the svn:externals)
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13225 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'setup.py')
-rwxr-xr-x[-rw-r--r--]setup.py35
1 files changed, 32 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index f0b76ab..ac634f2 100644..100755
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,34 @@
#!/usr/bin/env python
-from __future__ import division # confidence high
-import pytools.stsci_distutils_hack
-pytools.stsci_distutils_hack.run(pytools_version = "3.0")
+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.2', 'stsci.distutils>=0.2dev'],
+ d2to1=True,
+ use_2to3=True
+)