Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/algopy/, dev-python/algopy/files/
Date: Mon, 05 Sep 2016 09:21:20
Message-Id: 1473067147.37e723a40bbc8e99ccfca71c62c7a86542186c56.soap@gentoo
1 commit: 37e723a40bbc8e99ccfca71c62c7a86542186c56
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 5 08:08:49 2016 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 5 09:19:07 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37e723a4
7
8 dev-python/algopy: Add py3.5 support
9
10 * EAPI=6
11 * Fix one error in testsuite by
12 backporting upstream fix
13 https://github.com/b45ch1/algopy/commit/f563d86e72b32caa296ac77b0836ce0e36a5f6ab
14
15 Package-Manager: portage-2.3.0
16
17 dev-python/algopy/algopy-0.5.3.ebuild | 7 +++---
18 .../files/algopy-0.5.3-fix-test-cast-ufunc.patch | 29 ++++++++++++++++++++++
19 2 files changed, 33 insertions(+), 3 deletions(-)
20
21 diff --git a/dev-python/algopy/algopy-0.5.3.ebuild b/dev-python/algopy/algopy-0.5.3.ebuild
22 index 900facf..3597aa2 100644
23 --- a/dev-python/algopy/algopy-0.5.3.ebuild
24 +++ b/dev-python/algopy/algopy-0.5.3.ebuild
25 @@ -1,10 +1,10 @@
26 -# Copyright 1999-2015 Gentoo Foundation
27 +# Copyright 1999-2016 Gentoo Foundation
28 # Distributed under the terms of the GNU General Public License v2
29 # $Id$
30
31 -EAPI=5
32 +EAPI=6
33
34 -PYTHON_COMPAT=( python2_7 python3_{3,4} )
35 +PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
36
37 inherit distutils-r1
38
39 @@ -24,6 +24,7 @@ RDEPEND="
40 DEPEND="${RDEPEND}
41 test? ( dev-python/nose[${PYTHON_USEDEP}] )
42 "
43 +PATCHES=( "${FILESDIR}/${P}-fix-test-cast-ufunc.patch" )
44
45 python_test() {
46 ${EPYTHON} run_tests.py || die
47
48 diff --git a/dev-python/algopy/files/algopy-0.5.3-fix-test-cast-ufunc.patch b/dev-python/algopy/files/algopy-0.5.3-fix-test-cast-ufunc.patch
49 new file mode 100644
50 index 00000000..0b8a0ed
51 --- /dev/null
52 +++ b/dev-python/algopy/files/algopy-0.5.3-fix-test-cast-ufunc.patch
53 @@ -0,0 +1,29 @@
54 +From f563d86e72b32caa296ac77b0836ce0e36a5f6ab Mon Sep 17 00:00:00 2001
55 +From: Sebastian Walter <sebastian.walter@××××××××××××××××××.de>
56 +Date: Thu, 30 Jun 2016 15:11:19 +0200
57 +Subject: [PATCH] Problem: numpy raised TypeError: Cannot cast ufunc add output
58 + from dtype('complex128') to dtype('float64') with casting rule 'same_kind'
59 + Solution: use numpy.add(x,y,out=x, casting='unsafe') to cast from complex to
60 + float if necessary
61 +
62 +---
63 + algopy/utpm/algorithms.py | 6 +++---
64 + 1 file changed, 3 insertions(+), 3 deletions(-)
65 +
66 +diff --git a/algopy/utpm/algorithms.py b/algopy/utpm/algorithms.py
67 +index ccf7ca4..5f2651e 100644
68 +--- a/algopy/utpm/algorithms.py
69 ++++ b/algopy/utpm/algorithms.py
70 +@@ -1190,9 +1190,9 @@ def _dot(cls, x_data, y_data, out = None):
71 + for d in range(D):
72 + for p in range(P):
73 + for c in range(d+1):
74 +- z_data[d,p,...] += numpy.dot(
75 +- x_data[c,p,...],
76 +- y_data[d-c,p,...])
77 ++ tmp = numpy.dot(x_data[c,p,...],
78 ++ y_data[d-c,p,...])
79 ++ numpy.add(z_data[d,p,...], tmp, out=z_data[d,p, ...], casting='unsafe')
80 +
81 + return out
82 +