From 5d00dcb1a0123389d9759698a5c42828e17af9bc Mon Sep 17 00:00:00 2001 From: sienkiew Date: Tue, 25 Mar 2014 14:53:08 +0000 Subject: 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 --- setup.py | 50 ++++++++++++-------------------------------------- 1 file changed, 12 insertions(+), 38 deletions(-) (limited to 'setup.py') 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 - ) -- cgit