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: ed100bfc-0583-0410-97f2-c26b58777a21
  • Loading branch information...
1 parent 44f949f commit 1ec0858329e6065a77b1bf1667d3f6fb4042c597 @embray committed Nov 9, 2012
Showing with 23 additions and 7 deletions.
  1. +10 −0 README.txt
  2. +2 −3 cextern/README
  3. +8 −1 setup.cfg
  4. +3 −3 src/compressionmodule.c
@@ -14,3 +14,13 @@ Trac. To report an issue in PyFITS, send an e-mail to
The latest source code can be checked out from SVN with::
svn checkout
+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.
@@ -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
-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.
@@ -40,7 +40,9 @@ scripts =
-sources =
+sources =
+# Comment out or remove all of the cextern/cfitsio/* files when building with
+# the system CFITSIO
@@ -115,6 +117,8 @@ sources =
include_dirs =
+# Comment out or remove the following line when building with the system
# Squelch a handful of warnings (which actually cause pip to break in tox and
@@ -130,6 +134,9 @@ extra_compile_args =
+# Uncomment this line when building with the system CFITSIO
+#libraries = cfitsio
optional = True
fail_message =
@@ -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 */

0 comments on commit 1ec0858

Please sign in to comment.