Gentoo Archives: gentoo-commits

From: Sebastien Fabbro <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/astropy/, dev-python/astropy/files/
Date: Wed, 31 Aug 2016 23:07:48
Message-Id: 1472684845.3403656699bb4587f0dd0399078ab36c30535975.bicatali@gentoo
1 commit: 3403656699bb4587f0dd0399078ab36c30535975
2 Author: Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 31 21:50:28 2016 +0000
4 Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 31 23:07:25 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34036566
7
8 dev-python/astropy: version bump. fix also xdg sandboxing issue
9 Gentoo-Bug: 587700
10
11 Package-Manager: portage-2.3.0
12
13 dev-python/astropy/Manifest | 1 +
14 dev-python/astropy/astropy-1.2.1.ebuild | 98 ++++++++++++++++++++++
15 .../astropy/files/astropy-1.2.1-cfitsio-338.patch | 16 ++++
16 3 files changed, 115 insertions(+)
17
18 diff --git a/dev-python/astropy/Manifest b/dev-python/astropy/Manifest
19 index 2f4f81f..6cf0a59 100644
20 --- a/dev-python/astropy/Manifest
21 +++ b/dev-python/astropy/Manifest
22 @@ -1 +1,2 @@
23 DIST astropy-1.1.2.tar.gz 8059713 SHA256 6f0d84cd7dfb304bb437dda666406a1d42208c16204043bc920308ff8ffdfad1 SHA512 b83c4a1415a3eb8c016507705d0d2f22971e4da937bb97953eec08f8f856933d8fa76ce8c536122235b19e7879b16add2e20fd2fee3e488f9b2b4bf1b9f4dbdb WHIRLPOOL 01cdfd33c29f7128e88be3f53b7ecdec37d95ba06acae6ceeba83746e0454aa220396fb00519b30639ac01b5b297fad004488d34856295735e04924d154c4eb9
24 +DIST astropy-1.2.1.tar.gz 8179665 SHA256 0d7ef702166f26fed239b59fc12edcd5243ca5bf562a36202fd8c6b0270d6e48 SHA512 2ef37537a4c6b2ec50a1d898f600978475c9c5d2cb66ba19d06782656e9ddcb4aa6a8e53217e318448cedac45dac0dce0d8cc2fe94cddc15ebb306b3b0794595 WHIRLPOOL d37374f23a0121fdc92fa572facc248f0a571dacb8edcf1a9d0987d6a40287de199262ec01f654bd6ea5aece826e5588d2869558152adffe9ab490fa46f2e36d
25
26 diff --git a/dev-python/astropy/astropy-1.2.1.ebuild b/dev-python/astropy/astropy-1.2.1.ebuild
27 new file mode 100644
28 index 00000000..20994e5
29 --- /dev/null
30 +++ b/dev-python/astropy/astropy-1.2.1.ebuild
31 @@ -0,0 +1,98 @@
32 +# Copyright 1999-2016 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI=6
37 +
38 +PYTHON_COMPAT=( python2_7 python3_{4,5} )
39 +
40 +inherit distutils-r1 xdg-utils
41 +
42 +DESCRIPTION="Core functionality for performing astrophysics with Python"
43 +HOMEPAGE="http://astropy.org/"
44 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
45 +
46 +LICENSE="BSD"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
49 +IUSE="doc test"
50 +
51 +RDEPEND="
52 + dev-libs/expat:0=
53 + dev-python/configobj[${PYTHON_USEDEP}]
54 + >=dev-python/numpy-1.10[${PYTHON_USEDEP}]
55 + dev-python/ply[${PYTHON_USEDEP}]
56 + dev-python/six[${PYTHON_USEDEP}]
57 + >=sci-astronomy/erfa-1.2:0=
58 + >=sci-astronomy/wcslib-5:0=
59 + sci-libs/cfitsio:0=
60 + sys-libs/zlib:0="
61 +DEPEND="${RDEPEND}
62 + >=dev-python/astropy-helpers-1.1[${PYTHON_USEDEP}]
63 + dev-python/cython[${PYTHON_USEDEP}]
64 + dev-python/setuptools[${PYTHON_USEDEP}]
65 + virtual/pkgconfig
66 + doc? (
67 + media-gfx/graphviz
68 + $(python_gen_cond_dep 'dev-libs/libxml2[${PYTHON_USEDEP}]' python2_7)
69 + $(python_gen_cond_dep 'dev-python/h5py[${PYTHON_USEDEP}]' python2_7)
70 + $(python_gen_cond_dep 'dev-python/matplotlib[${PYTHON_USEDEP}]' python2_7)
71 + $(python_gen_cond_dep 'dev-python/pytest[${PYTHON_USEDEP}]' python2_7)
72 + $(python_gen_cond_dep 'dev-python/sphinx[${PYTHON_USEDEP}]' python2_7)
73 + $(python_gen_cond_dep 'dev-python/wcsaxes[${PYTHON_USEDEP}]' python2_7)
74 + $(python_gen_cond_dep 'sci-libs/scipy[${PYTHON_USEDEP}]'python2_7)
75 + )
76 + test? (
77 + dev-libs/libxml2[${PYTHON_USEDEP}]
78 + dev-python/pytest[${PYTHON_USEDEP}]
79 + dev-python/h5py[${PYTHON_USEDEP}]
80 + dev-python/matplotlib[${PYTHON_USEDEP}]
81 + sci-libs/scipy[${PYTHON_USEDEP}]
82 + )"
83 +
84 +REQUIRED_USE="doc? ( || ( $(python_gen_useflags 'python2*') ) )"
85 +
86 +PATCHES=(
87 + "${FILESDIR}/${PN}-1.0.4-system-six.patch"
88 + "${FILESDIR}/${PN}-1.0.4-system-configobj.patch"
89 + "${FILESDIR}/${PN}-1.1.1-mark-kown-failures.patch"
90 + "${FILESDIR}/${PN}-1.2.1-cfitsio-338.patch"
91 +)
92 +
93 +pkg_setup() {
94 + use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( 'python2*' )
95 +}
96 +
97 +python_prepare_all() {
98 + export mydistutilsargs="--offline"
99 + export ASTROPY_USE_SYSTEM_PYTEST=True
100 + rm -r ${PN}_helpers || die
101 + cp "${FILESDIR}"/astropy-ply.py astropy/extern/ply.py || die
102 + rm -r cextern/{expat,erfa,cfitsio,wcslib} || die
103 + sed -i -e '/auto_use/s/True/False/' setup.cfg || die
104 + cat >> setup.cfg <<-EOF
105 + [build]
106 + use_system_libraries=1
107 + EOF
108 + xdg_environment_reset
109 + distutils-r1_python_prepare_all
110 +}
111 +
112 +python_compile_all() {
113 + if use doc; then
114 + python_setup "python2*"
115 + VARTEXFONTS="${T}"/fonts \
116 + MPLCONFIGDIR="${BUILD_DIR}" \
117 + PYTHONPATH="${BUILD_DIR}"/lib \
118 + esetup.py build_sphinx
119 + fi
120 +}
121 +
122 +python_test() {
123 + esetup.py test
124 +}
125 +
126 +python_install_all() {
127 + use doc && local HTML_DOCS=( docs/_build/html/. )
128 + distutils-r1_python_install_all
129 +}
130
131 diff --git a/dev-python/astropy/files/astropy-1.2.1-cfitsio-338.patch b/dev-python/astropy/files/astropy-1.2.1-cfitsio-338.patch
132 new file mode 100644
133 index 00000000..9a688d9
134 --- /dev/null
135 +++ b/dev-python/astropy/files/astropy-1.2.1-cfitsio-338.patch
136 @@ -0,0 +1,16 @@
137 +Author: Ole Streicher <olebole@××××××.org>
138 +Description: Make TFORMx check more flexible
139 + The maximal column length in cfitsio changed between version 3370 and 3380.
140 + This patch checks their syntax, without a specific length.
141 +Bug: https://github.com/astropy/astropy/issues/4646
142 +--- a/astropy/io/fits/tests/test_image.py
143 ++++ b/astropy/io/fits/tests/test_image.py
144 +@@ -1070,7 +1070,7 @@
145 + hdu.writeto(self.temp('test.fits'))
146 +
147 + with fits.open(self.temp('test.fits')) as hdul:
148 +- assert (hdul['SCI'].data == cube).all()
149 ++ assert np.abs(hdul['SCI'].data - cube).max() < 1./15.
150 +
151 + def test_subtractive_dither_seed(self):
152 + """