summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2016-03-09 23:17:07 +0000
committerSébastien Fabbro <bicatali@gentoo.org>2016-03-18 20:09:44 +0000
commit32a6ebaa2e0289e627c604ccf6808328af555690 (patch)
treec8b772a5a2b8a8ac8da48c7fdbcdb3f76dbb9e95 /dev-python/astroscrappy/files
parentdev-python/ccdproc: initial import (diff)
downloadgentoo-32a6ebaa2e0289e627c604ccf6808328af555690.tar.gz
gentoo-32a6ebaa2e0289e627c604ccf6808328af555690.tar.bz2
gentoo-32a6ebaa2e0289e627c604ccf6808328af555690.zip
dev-python/astroscrappy: initial import
Package-Manager: portage-2.2.27
Diffstat (limited to 'dev-python/astroscrappy/files')
-rw-r--r--dev-python/astroscrappy/files/astroscrappy-1.0.3-dont-install-binary.patch14
-rw-r--r--dev-python/astroscrappy/files/astroscrappy-1.0.3-endian-fix-tests.patch100
-rw-r--r--dev-python/astroscrappy/files/astroscrappy-1.0.3-numpy-fix-tests.patch21
-rw-r--r--dev-python/astroscrappy/files/astroscrappy-1.0.3-respect-user-flag.patch35
4 files changed, 170 insertions, 0 deletions
diff --git a/dev-python/astroscrappy/files/astroscrappy-1.0.3-dont-install-binary.patch b/dev-python/astroscrappy/files/astroscrappy-1.0.3-dont-install-binary.patch
new file mode 100644
index 000000000000..4c69f00cc88d
--- /dev/null
+++ b/dev-python/astroscrappy/files/astroscrappy-1.0.3-dont-install-binary.patch
@@ -0,0 +1,14 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Don't install example/template binary
+--- a/setup.py
++++ b/setup.py
+@@ -80,9 +80,6 @@
+
+ # Define entry points for command-line scripts
+ entry_points = {}
+-entry_points['console_scripts'] = [
+- 'astropy-package-template-example = packagename.example_mod:main',
+-]
+
+ # Include all .c files, recursively, including those generated by
+ # Cython, since we can not do this in MANIFEST.in with a "dynamic"
diff --git a/dev-python/astroscrappy/files/astroscrappy-1.0.3-endian-fix-tests.patch b/dev-python/astroscrappy/files/astroscrappy-1.0.3-endian-fix-tests.patch
new file mode 100644
index 000000000000..7a2bbb6299c6
--- /dev/null
+++ b/dev-python/astroscrappy/files/astroscrappy-1.0.3-endian-fix-tests.patch
@@ -0,0 +1,100 @@
+From 5b5ce99c63d03e60b6027f09f72231db11a87bf2 Mon Sep 17 00:00:00 2001
+From: Curtis McCully <cmccully@lcogt.net>
+Date: Thu, 3 Dec 2015 12:02:38 -0800
+Subject: [PATCH] Made tests not endian specific.
+--- a/astroscrappy/tests/test_utils.py
++++ b/astroscrappy/tests/test_utils.py
+@@ -56,7 +56,7 @@
+
+
+ def test_medfilt5():
+- a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('<f4')
++ a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('f4')
+ npmed5 = ndimage.filters.median_filter(a, size=(5, 5), mode='nearest')
+ npmed5[:2, :] = a[:2, :]
+ npmed5[-2:, :] = a[-2:, :]
+@@ -68,7 +68,7 @@
+
+
+ def test_medfilt7():
+- a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('<f4')
++ a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('f4')
+ npmed7 = ndimage.filters.median_filter(a, size=(7, 7), mode='nearest')
+ npmed7[:3, :] = a[:3, :]
+ npmed7[-3:, :] = a[-3:, :]
+@@ -80,7 +80,7 @@
+
+
+ def test_sepmedfilt3():
+- a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('<f4')
++ a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('f4')
+ npmed3 = ndimage.filters.median_filter(a, size=(1, 3), mode='nearest')
+ npmed3[:, :1] = a[:, :1]
+ npmed3[:, -1:] = a[:, -1:]
+@@ -95,7 +95,7 @@
+
+
+ def test_sepmedfilt5():
+- a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('<f4')
++ a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('f4')
+ npmed5 = ndimage.filters.median_filter(a, size=(1, 5), mode='nearest')
+ npmed5[:, :2] = a[:, :2]
+ npmed5[:, -2:] = a[:, -2:]
+@@ -110,7 +110,7 @@
+
+
+ def test_sepmedfilt7():
+- a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('<f4')
++ a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('f4')
+ npmed7 = ndimage.filters.median_filter(a, size=(1, 7), mode='nearest')
+ npmed7[:, :3] = a[:, :3]
+ npmed7[:, -3:] = a[:, -3:]
+@@ -125,7 +125,7 @@
+
+
+ def test_sepmedfilt9():
+- a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('<f4')
++ a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('f4')
+ npmed9 = ndimage.filters.median_filter(a, size=(1, 9), mode='nearest')
+ npmed9[:, :4] = a[:, :4]
+ npmed9[:, -4:] = a[:, -4:]
+@@ -174,7 +174,7 @@
+
+
+ def test_subsample():
+- a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('<f4')
++ a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('f4')
+ npsubsamp = np.zeros((a.shape[0] * 2, a.shape[1] * 2), dtype=np.float32)
+ for i in range(a.shape[0]):
+ for j in range(a.shape[1]):
+@@ -189,8 +189,8 @@
+
+ def test_rebin():
+ a = np.ascontiguousarray(np.random.random((2002, 2002)), dtype=np.float32)
+- a = a.astype('<f4')
+- nprebin = np.zeros((1001, 1001), dtype=np.float32).astype('<f4')
++ a = a.astype('f4')
++ nprebin = np.zeros((1001, 1001), dtype=np.float32).astype('f4')
+ for i in range(1001):
+ for j in range(1001):
+ nprebin[i, j] = (a[2 * i, 2 * j] + a[2 * i + 1, 2 * j] +
+@@ -202,7 +202,7 @@
+
+
+ def test_laplaceconvolve():
+- a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('<f4')
++ a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('f4')
+ k = np.array([[0.0, -1.0, 0.0], [-1.0, 4.0, -1.0], [0.0, -1.0, 0.0]])
+ k = k.astype('<f4')
+ npconv = ndimage.filters.convolve(a, k, mode='constant', cval=0.0)
+@@ -211,8 +211,8 @@
+
+
+ def test_convolve():
+- a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('<f4')
+- k = np.ascontiguousarray(np.random.random((5, 5))).astype('<f4')
++ a = np.ascontiguousarray(np.random.random((1001, 1001))).astype('f4')
++ k = np.ascontiguousarray(np.random.random((5, 5))).astype('f4')
+ npconv = ndimage.filters.convolve(a, k, mode='constant', cval=0.0)
+ cconv = convolve(a, k)
+ assert_allclose(cconv, npconv, rtol=0, atol=1e-5)
diff --git a/dev-python/astroscrappy/files/astroscrappy-1.0.3-numpy-fix-tests.patch b/dev-python/astroscrappy/files/astroscrappy-1.0.3-numpy-fix-tests.patch
new file mode 100644
index 000000000000..d7a1c93a5740
--- /dev/null
+++ b/dev-python/astroscrappy/files/astroscrappy-1.0.3-numpy-fix-tests.patch
@@ -0,0 +1,21 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Cast the numpy arrays in the test to the same data type
+Bug: https://ci.debian.net/data/packages/unstable/amd64/a/astroscrappy/20160112_151253.autopkgtest.log.gz
+--- a/astroscrappy/tests/test_astroscrappy.py
++++ b/astroscrappy/tests/test_astroscrappy.py
+@@ -36,7 +36,7 @@
+ imdata += gaussian(imdata.shape, x, y, brightness, 3.5)
+
+ # Add the poisson noise
+-imdata = np.random.poisson(imdata)
++imdata = np.float32(np.random.poisson(imdata))
+
+ # Add readnoise
+ imdata += np.random.normal(0.0, 10.0, size=(1001, 1001))
+@@ -60,4 +60,4 @@
+ # contrast that we can turn our detection threshold up.
+ mask, _clean = detect_cosmics(imdata, readnoise=10., gain=1.0,
+ sigclip=6, sigfrac=1.0)
+- assert (mask == expected_crmask).sum() == (1001 * 1001)
+\ No newline at end of file
++ assert (mask == expected_crmask).sum() == (1001 * 1001)
diff --git a/dev-python/astroscrappy/files/astroscrappy-1.0.3-respect-user-flag.patch b/dev-python/astroscrappy/files/astroscrappy-1.0.3-respect-user-flag.patch
new file mode 100644
index 000000000000..fb7bca64ce7f
--- /dev/null
+++ b/dev-python/astroscrappy/files/astroscrappy-1.0.3-respect-user-flag.patch
@@ -0,0 +1,35 @@
+--- astroscrappy/astroscrappy/utils/setup_package.py.orig 2016-03-09 22:50:34.304043122 +0000
++++ astroscrappy/astroscrappy/utils/setup_package.py 2016-03-09 22:54:53.560783823 +0000
+@@ -43,30 +43,11 @@
+ sources=med_sources,
+ include_dirs=include_dirs,
+ libraries=libraries,
+- language="c",
+- extra_compile_args=['-g', '-O3', '-funroll-loops',
+- '-ffast-math'])
++ language="c")
+ ext_im = Extension(name=str("astroscrappy.utils.image_utils"),
+ sources=im_sources,
+ include_dirs=include_dirs,
+ libraries=libraries,
+- language="c",
+- extra_compile_args=['-g', '-O3', '-funroll-loops',
+- '-ffast-math'])
+-
+- has_openmp, outputs = check_openmp()
+- if has_openmp:
+- ext_med.extra_compile_args.append('-fopenmp')
+- ext_im.extra_compile_args.append('-fopenmp')
+- ext_med.extra_link_args = ['-g', '-fopenmp']
+- ext_im.extra_link_args = ['-g', '-fopenmp']
+- else:
+- log.warn('OpenMP was not found. '
+- 'astroscrappy will be compiled without OpenMP. '
+- '(Use the "-v" option of setup.py for more details.)')
+- log.debug(('(Start of OpenMP info)\n'
+- 'compiler stdout:\n{0}\n'
+- 'compiler stderr:\n{1}\n'
+- '(End of OpenMP info)').format(*outputs))
++ language="c")
+
+ return [ext_med, ext_im]