diff options
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 64 |
1 files changed, 54 insertions, 10 deletions
@@ -1,15 +1,59 @@ #!/usr/bin/env python +import os +import subprocess +import sys +from glob import glob +from numpy import get_include as np_include +from setuptools import setup, find_packages, Extension -try: - from setuptools import setup -except ImportError: - from distribute_setup import use_setuptools - use_setuptools() - from setuptools import setup + +if os.path.exists('relic'): + sys.path.insert(1, 'relic') + import relic.release +else: + try: + import relic.release + except ImportError: + try: + subprocess.check_call(['git', 'clone', + 'https://github.com/jhunkeler/relic.git']) + sys.path.insert(1, 'relic') + import relic.release + except subprocess.CalledProcessError as e: + print(e) + exit(1) + + +version = relic.release.get_info() +relic.release.write_template(version, 'lib/stwcs') setup( - setup_requires=['d2to1>=0.2.9', 'stsci.distutils>=0.3.2'], - d2to1=True, - use_2to3=False, - zip_safe=False + name = 'stwcs', + version = version.pep386, + author = 'Nadia Dencheva, Warren Hack', + author_email = 'help@stsci.edu', + description = 'Recomputes and records the WCS of an HST observation (includeing distortion) in the file.', + url = 'https://github.com/spacetelescope/stwcs', + classifiers = [ + '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', + ], + install_requires = [ + 'astropy', + 'numpy', + 'stsci.tools', + ], + package_dir = { + '': 'lib', + }, + packages = find_packages('lib'), + package_data = { + 'stwcs/gui': ['*.help'], + 'stwcs/gui/pars': ['*'], + 'stwcs/gui/htmlhelp': ['*'], + }, ) |