summaryrefslogtreecommitdiff
path: root/setup.py.old
diff options
context:
space:
mode:
authordencheva <dencheva@stsci.edu>2009-02-10 15:58:37 -0500
committerdencheva <dencheva@stsci.edu>2009-02-10 15:58:37 -0500
commit914af36db70dafd6417198634ce1e55a5a5dd8d9 (patch)
treec878658f842a9deb072ecf494076e87ac31a42bd /setup.py.old
parentcc6eb9ab94b41a2f5ab513d21971bc6bfaa036c4 (diff)
downloadstwcs_hcf-914af36db70dafd6417198634ce1e55a5a5dd8d9.tar.gz
Modified the constructor for HSTWCS. Now it can be created given:
- a filename and extension number - fully qualified filename - a pyfits object and an extension number - if given an instrument and detctor parameters, a template HSTWCS object for that instrument will be created. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/updatewcs@7534 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'setup.py.old')
-rw-r--r--setup.py.old89
1 files changed, 0 insertions, 89 deletions
diff --git a/setup.py.old b/setup.py.old
deleted file mode 100644
index a4a57a2..0000000
--- a/setup.py.old
+++ /dev/null
@@ -1,89 +0,0 @@
-from distutils.core import setup, Extension
-from os.path import join
-
-######################################################################
-# NUMPY
-try:
- import numpy
-except ImportError:
- print "numpy must be installed to build pywcs."
- print "ABORTING."
- sys.exit(1)
-
-try:
- numpy_include = numpy.get_include()
-except AttributeError:
- numpy_include = numpy.get_numpy_include()
-
-######################################################################
-# PyFITS
-try:
- import pyfits
-except ImportError:
- print "WARNING: PyFITS must be installed to use pywcs."
- print " Since this is not a build-time dependency, the build will proceed."
-
-######################################################################
-######################################################################
-# WCSLIB
-WCSVERSION = "4.3"
-WCSLIB = "wcslib-%s" % WCSVERSION # Path to wcslib
-WCSLIBC = join('pywcs', WCSLIB, "C") # Path to wcslib source files
-WCSFILES = [ # List of wcslib files to compile
- 'flexed/wcsulex.c',
- 'flexed/wcsutrn.c',
- 'cel.c',
- 'lin.c',
- 'log.c',
- 'prj.c',
- 'spc.c',
- 'sph.c',
- 'spx.c',
- 'tab.c',
- 'wcs.c',
- 'wcsfix.c',
- 'wcshdr.c',
- 'wcspih.c',
- 'wcstrig.c',
- 'wcsunits.c',
- 'wcsutil.c']
-WCSFILES = [join(WCSLIBC, x) for x in WCSFILES]
-######################################################################
-
-######################################################################
-# GENERATE DOCSTRINGS IN C
-docstrings = {}
-execfile("pywcs/doc/docstrings.py", docstrings)
-keys = docstrings.keys()
-keys.sort()
-fd = open("pywcs/src/docstrings.h", "w")
-fd.write('/* This file is autogenerated by setup.py. To edit its contents\n')
-fd.write(' edit doc/docstrings.py\n')
-fd.write('*/\n')
-for key in keys:
- if key.startswith('__'):
- continue
- val = docstrings[key].lstrip().encode("string_escape").replace('"', '\\"')
- fd.write("static const char doc_%s[] = \"%s\";\n\n" % (key, val))
-fd.close()
-
-######################################################################
-
-setup(name="hstwcs",
- version="0.1",
- description="HST WCS Corrections",
- packages=['hstwcs', 'hstwcs/pywcs', 'hstwcs/updatewcs', 'hstwcs/wcsutil', 'hstwcs/distortion'],
- package_dir={'hstwcs':'lib', 'hstwcs/pywcs': 'pywcs/pywcs', 'hstwcs/updatewcs': 'updatewcs',
- 'hstwcs/wcsutil': 'wcsutil', 'hstwcs/distortion': 'distortion'},
- ext_modules=[
- Extension('hstwcs.pywcs._pywcs',
- ['pywcs/src/pywcs.c'] +
- WCSFILES,
- include_dirs=[
- numpy_include,
- WCSLIBC,
- "src"
- ]
- )
- ]
- )