Fix #492.  Raise an exception when an invalid type is passed to the Unit constructor.
Merge branch 'fits/astropy' into astropy

This merges up through r1927 from pyfits' trunk in SVN.  Closes the following
issues in Astropy:

Closes #339 astropy.io.fits.Header totextfile and Header.__init__ disagree on 'endcard' convention
Closes #318 Move io.fits external C dependencies into cextern

Conflicts:
	README.txt
	astropy/io/fits/src/compress.c
	astropy/io/fits/src/crc32.h
	astropy/io/fits/src/deflate.h
	astropy/io/fits/src/fits_hcompress.c
	astropy/io/fits/src/fits_hdecompress.c
	astropy/io/fits/src/fitsio.c
	astropy/io/fits/src/fitsio.h
	astropy/io/fits/src/inffast.c
	astropy/io/fits/src/inffast.h
	astropy/io/fits/src/inffixed.h
	astropy/io/fits/src/inflate.h
	astropy/io/fits/src/inftrees.c
	astropy/io/fits/src/inftrees.h
	astropy/io/fits/src/pliocomp.c
	astropy/io/fits/src/quantize.c
	astropy/io/fits/src/ricecomp.c
	astropy/io/fits/src/ricecomp.h
	astropy/io/fits/src/trees.c
	astropy/io/fits/src/trees.h
	astropy/io/fits/src/zlib.c
	astropy/io/fits/src/zlib.h
	astropy/io/fits/src/zutil.h
	cextern/cfitsio/crc32.h
	cextern/cfitsio/deflate.h
	cextern/cfitsio/fits_hcompress.c
	cextern/cfitsio/fits_hdecompress.c
	cextern/cfitsio/inffast.c
	cextern/cfitsio/inffixed.h
	cextern/cfitsio/inftrees.c
	cextern/cfitsio/pliocomp.c
	cextern/cfitsio/quantize.c
	cextern/cfitsio/ricecomp.c
	cextern/cfitsio/trees.c
	cextern/cfitsio/trees.h
	cextern/cfitsio/zutil.h
	setup.cfg
	src/crc32.h
	src/deflate.h
	src/fits_hcompress.c
	src/fits_hdecompress.c
	src/inffast.c
	src/inffixed.h
	src/inftrees.c
	src/pliocomp.c
	src/quantize.c
	src/ricecomp.c
	src/trees.c
	src/trees.h
	src/zutil.h
	tox.ini

Conflicts:

	astropy/io/fits/diff.py
	astropy/io/fits/hdu/base.py
	astropy/io/fits/hdu/compressed.py
	astropy/io/fits/hdu/image.py
	astropy/io/fits/src/compressionmodule.c
	astropy/io/fits/tests/cfitsio_verify.c
	astropy/io/fits/tests/test_core.py
	astropy/io/fits/tests/test_header.py
	astropy/io/fits/tests/test_image.py
	astropy/io/fits/tests/test_uint.py
Fixed up the astropy.fits.io package setup to support linking the compression module with a system version of CFITSIO.
This little _is_mmap hack is unnecessary in Astropy since we don't support Python 2.5.
Added all the bug fixes from the last pyfits merge to the astropy changelog.  At this point the pyfits changes kind of dominate the changelog. I hope that's okay but if not we could think of a way of collapsing it (though I'd rather not; the 'What's New' page in the docs will provide a broader overview, I think.
Merge branch 'pyfits/astropy' into astropy

This *should* fix all the issues that were causing the build to fail in

Conflicts:

	astropy/io/fits/util.py
Add array_wrap to Column to handle ufuncs better

__array_wrap__ is called at the end of every ufunc.

If the output is the same shape as the column then call the standard
ndarray __array_wrap__ which will return a Column object.

If instead the output shape is different (e.g. for reduction ufuncs
like sum() or mean()) then return the output viewed as a standard
np.ndarray.  The "[()]" selects everything, but also converts a zero
rank array to a scalar.  For some reason np.sum() returns a zero rank
scalar array while np.mean() returns a scalar.  So the [()] is needed
for this case.
Add tests for Column __array_wrap__
Minor fixes for __array_wrap__ tests for np 1.4 and python 3
remove is_in_build_mode and set_build_mode in favor of _ASTROPY_SETUP_ usage
minor fixes
Imports in version.py template should be absolute, because this is used for affiliated packages too.
Merge branch 'pyfits/astropy' into astropy

Conflicts:
	README.txt

Conflicts:

	astropy/io/fits/src/compressionmodule.c
Merge branch 'master' into astropy
Add the compressionmodule header.
Fix missing import
Fix table array_wrap test for python 3
Merge pull request #497 from taldcroft/table-ufuncs

Add __array_wrap__ to table Column class

Closes #401
If a masked array is passed to `to`, return a masked array.
Ignore generated .pyd files.