[SCM] Core functionality for performing astronomy and astrophysics with Python branch, debian, updated. a3bd88b1ff9a9d972c577dd8145c5c9383e46848

Ole Streicher debian at liska.ath.cx
Mon Jul 9 19:44:05 UTC 2012


The following commit has been merged in the debian branch:
commit b9bb6aa7c1aeb947eae125ac1b8e7babfa2f8ed8
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Mon Jul 9 21:41:02 2012 +0200

    Unbundle external packages

diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b3d91bc
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+unbundle_expat.patch
+unbundle_wcslib.patch
+unbundle_zlib.patch
diff --git a/debian/patches/unbundle_expat.patch b/debian/patches/unbundle_expat.patch
new file mode 100644
index 0000000..3be7363
--- /dev/null
+++ b/debian/patches/unbundle_expat.patch
@@ -0,0 +1,28 @@
+--- a/astropy/utils/xml/setup_package.py
++++ b/astropy/utils/xml/setup_package.py
+@@ -28,11 +28,7 @@
+ 
+     return [Extension(
+         "astropy.utils.xml._iterparser",
+-        [join(XML_DIR, "iterparse.c"),
+-         join(EXPAT_DIR, "xmlparse.c"),
+-         join(EXPAT_DIR, "xmlrole.c"),
+-         join(EXPAT_DIR, "xmltok.c"),
+-         join(EXPAT_DIR, "xmltok_impl.c")],
++        [join(XML_DIR, "iterparse.c")],
+         define_macros=defines,
+-        include_dirs=[XML_DIR, EXPAT_DIR],
+-        extra_link_args=extra_link_args)]
++        include_dirs=[XML_DIR],
++        libraries=['expat'])]
+--- a/astropy/utils/xml/src/iterparse.c
++++ b/astropy/utils/xml/src/iterparse.c
+@@ -25,7 +25,7 @@
+ #include <Python.h>
+ #include "structmember.h"
+ 
+-#include "expat.h"
++#include <expat.h>
+ 
+ /******************************************************************************
+  * Convenience macros and functions
diff --git a/debian/patches/unbundle_wcslib.patch b/debian/patches/unbundle_wcslib.patch
new file mode 100644
index 0000000..2ac0c7e
--- /dev/null
+++ b/debian/patches/unbundle_wcslib.patch
@@ -0,0 +1,23 @@
+--- a/astropy/wcs/setup_package.py
++++ b/astropy/wcs/setup_package.py
+@@ -288,16 +288,16 @@
+ 
+     return [
+         Extension('astropy.wcs._wcs',
+-                  wcslib_files + astropy_wcs_files,
++                  astropy_wcs_files,
+                   include_dirs=[
+                       setup_helpers.get_numpy_include_path(),
+-                      wcslib_cpath,
+-                      join(WCSROOT, "include")],
++                      join(WCSROOT, "include"),
++                      '/usr/include/wcslib'],
+                   define_macros=define_macros,
+                   undef_macros=undef_macros,
+                   extra_compile_args=extra_compile_args,
+                   extra_link_args=extra_link_args,
+-                  libraries=libraries)]
++                  libraries=libraries + ['wcs', 'm'])]
+ 
+ 
+ def get_package_data():
diff --git a/debian/patches/unbundle_zlib.patch b/debian/patches/unbundle_zlib.patch
new file mode 100644
index 0000000..9f5ee04
--- /dev/null
+++ b/debian/patches/unbundle_zlib.patch
@@ -0,0 +1,70 @@
+--- a/astropy/io/fits/setup_package.py
++++ b/astropy/io/fits/setup_package.py
+@@ -17,10 +17,17 @@
+     return [
+         Extension(
+             'astropy.io.fits.compression',
+-            [os.path.relpath(x) for x in
+-             glob(os.path.join(os.path.dirname(__file__), 'src/*.c'))],
++            [ os.path.relpath(x)
++              for x in ( os.path.join(os.path.dirname(__file__), 'src', s)
++                         for s in ('compress.c', 'compressionmodule.c', \
++                             'fits_hcompress.c', 'fits_hdecompress.c', \
++                             'fitsio.c', 'pliocomp.c', 'quantize.c', \
++                             'ricecomp.c'))
++              ],
+             include_dirs=[setup_helpers.get_numpy_include_path()],
+-            extra_compile_args=extra_compile_args)
++            extra_compile_args=extra_compile_args,
++            libraries = ['z'])
++        
+     ]
+ 
+ 
+--- a/astropy/io/fits/src/compress.c
++++ b/astropy/io/fits/src/compress.c
+@@ -106,7 +106,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include "zlib.h"  
++#include <zlib.h>
+ 
+ int _astropy_uncompress2mem_from_mem(
+              char *inmemptr,     
+@@ -182,7 +182,7 @@
+         d_stream.next_out = uncompr;
+         d_stream.avail_out = uncomprLen;
+ 
+-        err = _astropy_inflate(&d_stream, Z_NO_FLUSH);
++        err = inflate(&d_stream, Z_NO_FLUSH);
+ 
+         if (err != Z_OK && err != Z_STREAM_END)
+         {
+@@ -217,7 +217,7 @@
+     *filesize = d_stream.total_out;
+ 
+     /* End the decompression */
+-    err = _astropy_inflateEnd(&d_stream);
++    err = inflateEnd(&d_stream);
+ 
+     /* free temporary output data buffer */
+     free(uncompr);
+@@ -285,7 +285,7 @@
+         c_stream.next_out = compr;
+         c_stream.avail_out = comprLen;
+ 
+-        err = _astropy_deflate(&c_stream, Z_FINISH);
++        err = deflate(&c_stream, Z_FINISH);
+ 
+         if (err != Z_OK && err != Z_STREAM_END)
+         {
+@@ -320,7 +320,7 @@
+     *filesize = c_stream.total_out;
+ 
+     /* End the compression */
+-    err = _astropy_deflateEnd(&c_stream);
++    err = deflateEnd(&c_stream);
+ 
+     /* free temporary output data buffer */
+     free(compr);

-- 
Core functionality for performing astronomy and astrophysics with Python



More information about the debian-science-commits mailing list