Update to 0.9.9
This commit is contained in:
parent
69060875a5
commit
fbb972cd42
118
1702.patch
118
1702.patch
|
@ -1,118 +0,0 @@
|
|||
From d70e59afd88263adafdc9f82578c152ea1987f24 Mon Sep 17 00:00:00 2001
|
||||
From: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
|
||||
Date: Tue, 5 Jan 2021 22:42:03 +0100
|
||||
Subject: [PATCH] Update to match numpy 1.20 changes
|
||||
|
||||
---
|
||||
pythran/tests/cases/goodExpoMeasure.py | 6 +++---
|
||||
pythran/tests/test_cases.py | 6 ++++++
|
||||
pythran/tests/test_ndarray.py | 7 +++++--
|
||||
pythran/tests/test_numpy_func2.py | 2 +-
|
||||
pythran/tests/test_typing.py | 2 +-
|
||||
5 files changed, 16 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/pythran/tests/cases/goodExpoMeasure.py b/pythran/tests/cases/goodExpoMeasure.py
|
||||
index 4c8f702..fc0d57b 100644
|
||||
--- a/pythran/tests/cases/goodExpoMeasure.py
|
||||
+++ b/pythran/tests/cases/goodExpoMeasure.py
|
||||
@@ -5,9 +5,9 @@ def goodExpoMeasure(inRGB, sigma):
|
||||
'''
|
||||
Compute the good exposition image quality measure on 1 input image.
|
||||
'''
|
||||
- R = inRGB[0,:,:].astype(numpy.float)
|
||||
- G = inRGB[1,:,:].astype(numpy.float)
|
||||
- B = inRGB[2,:,:].astype(numpy.float)
|
||||
+ R = inRGB[0,:,:].astype(numpy.float64)
|
||||
+ G = inRGB[1,:,:].astype(numpy.float64)
|
||||
+ B = inRGB[2,:,:].astype(numpy.float64)
|
||||
goodExpoR = numpy.exp(- ((R - 128)**2) / sigma)
|
||||
goodExpoG = numpy.exp(- ((G - 128)**2) / sigma)
|
||||
goodExpoB = numpy.exp(- ((B - 128)**2) / sigma)
|
||||
diff --git a/pythran/tests/test_cases.py b/pythran/tests/test_cases.py
|
||||
index 6a48ea4..15762ff 100644
|
||||
--- a/pythran/tests/test_cases.py
|
||||
+++ b/pythran/tests/test_cases.py
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
# TODO: check http://code.google.com/p/unladen-swallow/wiki/Benchmarks
|
||||
import os
|
||||
+from distutils.version import LooseVersion
|
||||
+import numpy
|
||||
import unittest
|
||||
|
||||
from pythran.tests import TestFromDir
|
||||
@@ -16,6 +18,9 @@ class TestCases(TestFromDir):
|
||||
|
||||
TestCases.populate(TestCases)
|
||||
|
||||
+if LooseVersion(numpy.__version__) >= '1.20':
|
||||
+ del TestCases.test_train_equalizer_norun0
|
||||
+
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
diff --git a/pythran/tests/test_ndarray.py b/pythran/tests/test_ndarray.py
|
||||
index a1dd634..b28cef5 100644
|
||||
--- a/pythran/tests/test_ndarray.py
|
||||
+++ b/pythran/tests/test_ndarray.py
|
||||
@@ -2,6 +2,7 @@ from pythran.tests import TestEnv
|
||||
from pythran.typing import NDArray, Tuple, List
|
||||
|
||||
import numpy
|
||||
+from distutils.version import LooseVersion
|
||||
|
||||
import unittest
|
||||
|
||||
@@ -271,12 +272,12 @@ class TestNdarray(TestEnv):
|
||||
self.run_test("""
|
||||
def numpy_np_float(n):
|
||||
import numpy
|
||||
- return numpy.ones(n, numpy.float)""",
|
||||
+ return numpy.ones(n, float)""",
|
||||
5,
|
||||
numpy_np_float=[int])
|
||||
|
||||
def test_numpy_complex(self):
|
||||
- self.run_test("def numpy_complex(n): import numpy ; return numpy.ones(n, numpy.complex)",
|
||||
+ self.run_test("def numpy_complex(n): import numpy ; return numpy.ones(n, complex)",
|
||||
5,
|
||||
numpy_complex=[int])
|
||||
|
||||
@@ -1092,6 +1093,8 @@ def complex_conversion0(x):
|
||||
5.,
|
||||
built_slice_indexing=[NDArray[float, :], int, int, float])
|
||||
|
||||
+ @unittest.skipIf(LooseVersion(numpy.__version__) >= '1.20',
|
||||
+ "numpy.dtype.type changed in 1.20.0")
|
||||
def test_dtype_type(self):
|
||||
self.run_test('''
|
||||
def dtype_type(x):
|
||||
diff --git a/pythran/tests/test_numpy_func2.py b/pythran/tests/test_numpy_func2.py
|
||||
index 0b3c441..53e105e 100644
|
||||
--- a/pythran/tests/test_numpy_func2.py
|
||||
+++ b/pythran/tests/test_numpy_func2.py
|
||||
@@ -753,7 +753,7 @@ def test_copy0(x):
|
||||
self.run_test("def np_empty_kwargs(a):\n from numpy import empty\n a = empty(a, dtype=int)\n return a.strides, len(a)", (3, 2), np_empty_kwargs=[Tuple[int, int]])
|
||||
|
||||
def test_empty_kwargs2(self):
|
||||
- self.run_test("def np_empty_kwargs2(a):\n from numpy import empty, float\n a = empty(a, dtype=float)\n return a.strides, a.shape", 3, np_empty_kwargs2=[int])
|
||||
+ self.run_test("def np_empty_kwargs2(a):\n from numpy import empty \n a = empty(a, dtype=float)\n return a.strides, a.shape", 3, np_empty_kwargs2=[int])
|
||||
|
||||
def test_arange(self):
|
||||
self.run_test("def np_arange_(a):\n from numpy import arange\n return arange(a, dtype=float)", 10, np_arange_=[int])
|
||||
diff --git a/pythran/tests/test_typing.py b/pythran/tests/test_typing.py
|
||||
index d10d7e6..a7a2934 100644
|
||||
--- a/pythran/tests/test_typing.py
|
||||
+++ b/pythran/tests/test_typing.py
|
||||
@@ -356,7 +356,7 @@ def recursive_interprocedural_typing2(c):
|
||||
print_type(numpy.ones(n, dtype=numpy.uint16).dtype)
|
||||
print_type(numpy.ones(n, dtype=numpy.uint64).dtype)
|
||||
print_type(numpy.ones(n, dtype=numpy.double).dtype)
|
||||
- print_type(numpy.ones(n, dtype=numpy.complex).dtype)
|
||||
+ print_type(numpy.ones(n, dtype=complex).dtype)
|
||||
''',
|
||||
3,
|
||||
print_numpy_types=[int])
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
From 4d317755a3b908cc2dada13619f08bae6d741944 Mon Sep 17 00:00:00 2001
|
||||
From: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
|
||||
Date: Sun, 13 Dec 2020 22:12:16 +0100
|
||||
Subject: [PATCH] Make RNG adaptor compatible with libstdc++
|
||||
|
||||
---
|
||||
pythran/pythonic/random/shuffle.hpp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/pythran/pythonic/random/shuffle.hpp b/pythran/pythonic/random/shuffle.hpp
|
||||
index 3d3b9eb91..19b74344f 100644
|
||||
--- a/pythran/pythonic/random/shuffle.hpp
|
||||
+++ b/pythran/pythonic/random/shuffle.hpp
|
||||
@@ -30,13 +30,13 @@ namespace random
|
||||
}
|
||||
|
||||
typedef unsigned result_type;
|
||||
- result_type min()
|
||||
+ static constexpr result_type min()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/* -1 because of the floor() operation performed by the float->unsigned
|
||||
* conversion */
|
||||
- result_type max()
|
||||
+ static constexpr result_type max()
|
||||
{
|
||||
return std::numeric_limits<result_type>::max() - 1;
|
||||
}
|
15
pythran.spec
15
pythran.spec
|
@ -1,7 +1,7 @@
|
|||
Name: pythran
|
||||
Version: 0.9.8^post3
|
||||
%global uver 0.9.8post3
|
||||
Release: 3%{?dist}
|
||||
Version: 0.9.9
|
||||
%global uver 0.9.9
|
||||
Release: 1%{?dist}
|
||||
Summary: Ahead of Time Python compiler for numeric kernels
|
||||
|
||||
# pythran is BSD
|
||||
|
@ -17,12 +17,6 @@ Provides: bundled(libcxx) = 3
|
|||
URL: https://github.com/serge-sans-paille/pythran
|
||||
Source0: %{url}/archive/%{uver}/%{name}-%{uver}.tar.gz
|
||||
|
||||
# Make RNG adaptor compatible with libstdc++
|
||||
Patch1: %{url}/commit/4d317755a3b908cc.patch
|
||||
|
||||
# Compatibility with numpy 1.20, see https://github.com/serge-sans-paille/pythran/pull/1702
|
||||
Patch2: 1702.patch
|
||||
|
||||
# there is no actual arched content
|
||||
# yet we want to test on all architectures
|
||||
# and we also might need to skip some
|
||||
|
@ -112,6 +106,9 @@ rm -rf docs/_build/html/.{doctrees,buildinfo}
|
|||
|
||||
|
||||
%changelog
|
||||
* Wed Mar 31 2021 sguelton@redhat.com - 0.9.9-1
|
||||
- Update to 0.9.9
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8^post3-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (pythran-0.9.8post3.tar.gz) = 2c81745157ffc61018c234f9cae7d1b78bb1f55ae08594fbcf05b3a1025c14ac734457da6724f5778e217ac19913274fdf9e7b77a40f81f3bd28e4ef12257778
|
||||
SHA512 (pythran-0.9.9.tar.gz) = e7bb35f04155c99e2b378087f75947c2838b37e6bb08e03f8a8bbc2a08b32387f5f7e4396df74df116f0527e3ecfcc93e8f74ebc341d4850fbee910983ff938d
|
||||
|
|
Loading…
Reference in New Issue