summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorsienkiew <sienkiew@stsci.edu>2014-03-25 10:53:08 -0400
committersienkiew <sienkiew@stsci.edu>2014-03-25 10:53:08 -0400
commit5d00dcb1a0123389d9759698a5c42828e17af9bc (patch)
treeecef07881ea7b6b661ee5f59847b00dafecf3409 /setup.py
parent64be292044c4428b5908acf5cc2dda6693ed1afb (diff)
downloadstsci.sphere-5d00dcb1a0123389d9759698a5c42828e17af9bc.tar.gz
mod for d2to1 install
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci.sphere/trunk@30670 fe389314-cf27-0410-b35b-8c050e845b92 Former-commit-id: 91667828b7e01b5aae55679093564473a976e8a9
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py50
1 files changed, 12 insertions, 38 deletions
diff --git a/setup.py b/setup.py
index b810728..798cd05 100755
--- a/setup.py
+++ b/setup.py
@@ -1,45 +1,19 @@
#!/usr/bin/env python
-CONTACT = "Michael Droettboom"
-EMAIL = "help@stsci.edu"
-VERSION = "0.1"
-
-from distutils.core import setup, Extension
-import sys
-
try:
- import numpy
+ from setuptools import setup
except ImportError:
- print("numpy must be installed to build sphere.")
- print("ABORTING.")
- raise
-
-major, minor, rest = numpy.__version__.split(".", 2)
-if (int(major), int(minor)) < (1, 4):
- print("numpy version 1.4 or later must be installed to build pywcs.")
- print("ABORTING.")
- raise ImportError
+ from distribute_setup import use_setuptools
+ use_setuptools()
+ from setuptools import setup
-try:
- numpy_include = numpy.get_include()
-except AttributeError:
- numpy_include = numpy.get_numpy_include()
+setup(
+ setup_requires=['d2to1>=0.2.5', 'stsci.distutils>=0.3.dev'],
+ namespace_packages=['stsci'], packages=['stsci'],
+ d2to1=True,
+ use_2to3=True,
+ zip_safe=False
+)
-extensions = [
- Extension('sphere.math_util',
- ['src/math_util.c'],
- include_dirs = [numpy_include],
- libraries = ['m'])
- ]
+# package_data = {'stsci.sphere.test': ['data/*.fits', 'data/*.fits.gz']},
-setup(
- name = 'sphere',
- version = VERSION,
- description = "Python based tools for spherical geometry",
- author = CONTACT,
- author_email = EMAIL,
- packages = ['sphere', 'sphere.test'],
- package_dir = {'sphere': 'lib', 'sphere.test': 'lib/test'},
- package_data = {'sphere.test': ['data/*.fits', 'data/*.fits.gz']},
- ext_modules = extensions
- )