Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tested building the compression module by linking to system-wide CFIT…

…SIO installations of a few different versions. Added some stubs and comments to the setup.cfg explaining how to accomplish this if desired.

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@1922 ed100bfc-0583-0410-97f2-c26b58777a21
  • Loading branch information...
commit 1ec0858329e6065a77b1bf1667d3f6fb4042c597 1 parent 44f949f
Erik Bray authored
10 README.txt
View
@@ -14,3 +14,13 @@ Trac. To report an issue in PyFITS, send an e-mail to help@stsci.edu.
The latest source code can be checked out from SVN with::
svn checkout https://svn6.assembla.com/svn/pyfits/trunk
+
+For Packagers
+===============
+As of version 3.2.0 PyFITS supports use of the standard CFITSIO library for
+compression support. A minimal copy of CFITSIO is included in the PyFITS
+source under cextern/cfitsio. Packagers wishing to link with an existing
+system CFITSIO remove this directory and modify the setup.cfg as instructed
+by the comments in that file. CFITSIO support has been tested for versions
+3.28 through 3.30. Earlier versions *may* work by YMMV. Please send in any
+results of experimentation with other CFITSIO versions.
5 cextern/README
View
@@ -7,9 +7,8 @@ It should be noted that this directory actually only contains cherry-picked
parts of CFITSIO used to specifically to support image tile compression. This
does not contain the entirety of CFITSIO. However, system packagers may remove
this bundled version of CFITSIO and link with a system-installed version
-instead.
-
-TODO: Provide instructions for system packagers.
+instead. Please see the top-level README.txt and the comments in setup.cfg to
+configure the build for linking with the system CFITSIO.
Note that CFITSIO also includes a complete copy of zlib. This may also be
replaced in favor of a system version of zlib.
9 setup.cfg
View
@@ -40,7 +40,9 @@ scripts =
scripts/fitsdiff
[extension=pyfits.compression]
-sources =
+sources =
+# Comment out or remove all of the cextern/cfitsio/* files when building with
+# the system CFITSIO
cextern/cfitsio/adler32.c
cextern/cfitsio/buffers.c
cextern/cfitsio/cfileio.c
@@ -115,6 +117,8 @@ sources =
src/compressionmodule.c
include_dirs =
numpy
+# Comment out or remove the following line when building with the system
+# CFITSIO
cextern/cfitsio
# Squelch a handful of warnings (which actually cause pip to break in tox and
@@ -130,6 +134,9 @@ extra_compile_args =
-Wno-comments
-Wno-switch
+# Uncomment this line when building with the system CFITSIO
+#libraries = cfitsio
+
optional = True
fail_message =
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6 src/compressionmodule.c
View
@@ -95,10 +95,10 @@
#include <math.h>
-#include "Python.h"
+#include <Python.h>
#include <numpy/arrayobject.h>
-#include "fitsio2.h"
-#include "string.h"
+#include <fitsio2.h>
+#include <string.h>
/* Some defines for Python3 support--bytes objects should be used where */
/* strings were previously used */
Please sign in to comment.
Something went wrong with that request. Please try again.