jjames pushed to python-theano (master). "New upstream release. (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Apr 2 17:06:04 UTC 2015


>From ad8e48218f9547b5faa4b8ab24f7bcdd7b215f3a Mon Sep 17 00:00:00 2001
From: Jerry James <jamesjer at betterlinux.com>
Date: Thu, 2 Apr 2015 11:05:22 -0600
Subject: New upstream release.

Also:
- Drop upstreamed -arm patch.
- Regenerate cython files to fix build failure.

diff --git a/.gitignore b/.gitignore
index 8577337..98cd684 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
 /Theano-missing.tar.xz
-/Theano-0.6.0.tar.gz
+/Theano-0.7.0.tar.gz
diff --git a/Theano.png b/Theano.png
index 2d1cc75..df88485 100644
Binary files a/Theano.png and b/Theano.png differ
diff --git a/badge.png b/badge.png
index 9244b2c..6cdadf5 100644
Binary files a/badge.png and b/badge.png differ
diff --git a/badge2.png b/badge2.png
index 361baf0..c98cf96 100644
Binary files a/badge2.png and b/badge2.png differ
diff --git a/python-theano-arm.patch b/python-theano-arm.patch
deleted file mode 100644
index 0a6420e..0000000
--- a/python-theano-arm.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./theano/gof/cmodule.py.orig	2014-03-12 20:00:00.000000000 -0600
-+++ ./theano/gof/cmodule.py	2015-02-21 20:05:04.130272458 -0700
-@@ -1723,7 +1723,7 @@ class GCC_compiler(object):
-         # or 64 bit and compile accordingly. This step is ignored for ARM
-         # architectures in order to make Theano compatible with the Raspberry
-         # Pi.
--        if any([not 'arm' in flag for flag in cxxflags]):
-+        if all([not 'arm' in flag for flag in cxxflags]):
-             n_bits = local_bitwidth()
-             cxxflags.append('-m%d' % n_bits)
-             _logger.debug("Compiling for %s bit architecture", n_bits)
diff --git a/python-theano-doc.patch b/python-theano-doc.patch
index 3e2223b..ab49966 100644
--- a/python-theano-doc.patch
+++ b/python-theano-doc.patch
@@ -1,17 +1,6 @@
---- ./MANIFEST.in.orig	2013-12-03 10:47:16.000000000 -0700
-+++ ./MANIFEST.in	2013-12-07 13:00:00.000000000 -0700
-@@ -4,7 +4,7 @@ global-include *.cu
- global-include *.cuh
- global-include *.sh
- global-include *.pkl
--recursive-include docs
-+recursive-include docs *
- include bin/theano-cache
- include bin/theano-nose
- include bin/theano-test
---- ./doc/tutorial/using_gpu.txt.orig	2013-12-03 10:47:22.000000000 -0700
-+++ ./doc/tutorial/using_gpu.txt	2013-12-07 13:00:00.000000000 -0700
-@@ -561,7 +561,7 @@ Modify and execute to work for a matrix
+--- ./doc/tutorial/using_gpu.txt.orig	2015-03-26 15:34:26.000000000 -0600
++++ ./doc/tutorial/using_gpu.txt	2015-03-31 20:00:00.000000000 -0600
+@@ -670,7 +670,7 @@ Modify and execute to work for a matrix
  
  
  
@@ -20,9 +9,20 @@
  
  **Example: Theano + PyCUDA**
  
---- ./theano/sandbox/cuda/basic_ops.py.orig	2013-12-03 10:47:22.000000000 -0700
-+++ ./theano/sandbox/cuda/basic_ops.py	2013-12-07 13:00:00.000000000 -0700
-@@ -1168,8 +1168,10 @@ class GpuCAReduce(GpuOp):
+--- ./MANIFEST.in.orig	2015-03-26 15:34:24.000000000 -0600
++++ ./MANIFEST.in	2015-03-31 20:00:00.000000000 -0600
+@@ -5,7 +5,7 @@ global-include *.cuh
+ global-include *.h
+ global-include *.sh
+ global-include *.pkl
+-recursive-include docs
++recursive-include docs *
+ include bin/theano-cache
+ include bin/theano-nose
+ include bin/theano-test
+--- ./theano/sandbox/cuda/basic_ops.py.orig	2015-03-26 15:34:27.000000000 -0600
++++ ./theano/sandbox/cuda/basic_ops.py	2015-03-31 20:00:00.000000000 -0600
+@@ -1239,8 +1239,10 @@ class GpuCAReduce(GpuOp):
  
      def c_code_reduce_01X(self, sio, node, name, x, z, fail, N):
          """
diff --git a/python-theano-six.patch b/python-theano-six.patch
index 284e01c..cfb9a58 100644
--- a/python-theano-six.patch
+++ b/python-theano-six.patch
@@ -1,5 +1,5 @@
---- ./theano/compat/__init__.py.orig	2013-12-03 10:47:22.000000000 -0700
-+++ ./theano/compat/__init__.py	2014-03-12 20:00:00.000000000 -0600
+--- ./theano/compat/__init__.py.orig	2015-03-26 15:34:26.000000000 -0600
++++ ./theano/compat/__init__.py	2015-03-31 21:00:00.000000000 -0600
 @@ -3,9 +3,9 @@
  """
  
@@ -12,9 +12,9 @@
 +from six.moves import reload_module as reload
  
  if PY3:
- 
---- ./theano/compile/debugmode.py.orig	2013-12-03 10:47:22.000000000 -0700
-+++ ./theano/compile/debugmode.py	2014-03-12 20:00:00.000000000 -0600
+     from operator import truediv as operator_div
+--- ./theano/compile/debugmode.py.orig	2015-03-26 15:34:26.000000000 -0600
++++ ./theano/compile/debugmode.py	2015-03-31 21:00:00.000000000 -0600
 @@ -12,8 +12,7 @@ import numpy
  
  import theano
@@ -22,23 +22,23 @@
 -from theano.compat import get_unbound_function
 -from theano.compat.six import StringIO
 +from six import get_unbound_function, StringIO
- from theano.gof import FunctionGraph,graph, utils, link, ops_with_inner_function
+ from theano.gof import (FunctionGraph, graph, utils, link,
+                         ops_with_inner_function)
  from theano.gof.link import raise_with_op
- from theano.gof.cc import CLinker
---- ./theano/compile/tests/test_module.py.orig	2013-12-03 10:47:22.000000000 -0700
-+++ ./theano/compile/tests/test_module.py	2014-03-12 20:00:00.000000000 -0600
-@@ -721,7 +721,7 @@ def test_pickle_aliased_memory():
-     assert m.y[0,0] == 3.14
- 
-     import logging
--    from theano.compat.six import StringIO
-+    from six import StringIO
- 
-     sio = StringIO()
-     handler = logging.StreamHandler(sio)
---- ./theano/configparser.py.orig	2013-12-03 10:47:22.000000000 -0700
-+++ ./theano/configparser.py	2014-03-12 20:00:00.000000000 -0600
-@@ -7,7 +7,7 @@ import os
+--- ./theano/compile/tests/test_function_module.py.orig	2015-03-26 15:34:26.000000000 -0600
++++ ./theano/compile/tests/test_function_module.py	2015-03-31 21:00:00.000000000 -0600
+@@ -657,7 +657,7 @@ class T_picklefunction(unittest.TestCase
+ 
+         f = theano.function([x], theano.tensor.dot(x, y))
+ 
+-        from theano.compat import BytesIO
++        from six import BytesIO
+         fp = BytesIO()
+         p = cPickle.Pickler(fp, 2)
+         p.persistent_id = pers_save
+--- ./theano/configparser.py.orig	2015-03-26 15:34:26.000000000 -0600
++++ ./theano/configparser.py	2015-03-31 21:00:00.000000000 -0600
+@@ -8,7 +8,7 @@ import shlex
  import sys
  import warnings
  
@@ -47,8 +47,8 @@
  
  import theano
  from theano.compat import configparser as ConfigParser
---- ./theano/gof/cc.py.orig	2013-12-03 10:47:22.000000000 -0700
-+++ ./theano/gof/cc.py	2014-03-12 20:00:00.000000000 -0600
+--- ./theano/gof/cc.py.orig	2015-03-26 15:34:26.000000000 -0600
++++ ./theano/gof/cc.py	2015-03-31 21:00:00.000000000 -0600
 @@ -10,8 +10,7 @@ from itertools import izip
  
  import numpy
@@ -56,36 +56,36 @@
 -from theano.compat import PY3
 -from theano.compat.six import StringIO
 +from six import PY3, StringIO
+ from theano.gof.utils import MethodNotDefined
  
  if PY3:
-     import hashlib
---- ./theano/gof/cmodule.py.orig	2013-12-03 10:47:22.000000000 -0700
-+++ ./theano/gof/cmodule.py	2014-03-12 20:00:00.000000000 -0600
+--- ./theano/gof/cmodule.py.orig	2015-03-26 15:34:26.000000000 -0600
++++ ./theano/gof/cmodule.py	2015-03-31 21:00:00.000000000 -0600
 @@ -24,8 +24,8 @@ except ImportError:
  import numpy.distutils  # TODO: TensorType should handle this
  
  import theano
 -from theano.compat import any, PY3, next, decode, decode_iter
--from theano.compat.six import BytesIO, StringIO
-+from theano.compat import any, next, decode, decode_iter
-+from six import PY3, BytesIO, StringIO
+-from theano.compat.six import b, BytesIO, StringIO
++from theano.compat import any, decode, decode_iter
++from six import PY3, next, b, BytesIO, StringIO
  from theano.gof.utils import flatten
  from theano.configparser import config
  from theano.gof.cc import hash_from_code
---- ./theano/gof/optdb.py.orig	2013-12-03 10:47:22.000000000 -0700
-+++ ./theano/gof/optdb.py	2014-03-12 20:00:00.000000000 -0600
-@@ -3,7 +3,7 @@ import sys
- from theano.gof.python25 import DefaultOrderedDict
+--- ./theano/gof/optdb.py.orig	2015-03-26 15:34:26.000000000 -0600
++++ ./theano/gof/optdb.py	2015-03-31 21:00:00.000000000 -0600
+@@ -4,7 +4,7 @@ import numpy
  
- import numpy
+ from theano.compat.python2x import DefaultOrderedDict
+ from theano.misc.ordered_set import OrderedSet
 -from theano.compat.six import StringIO
 +from six import StringIO
  from theano.gof import opt
  from theano.configparser import AddConfigVar, FloatParam
  from theano import config
---- ./theano/gof/opt.py.orig	2013-12-03 10:47:22.000000000 -0700
-+++ ./theano/gof/opt.py	2014-03-12 20:00:00.000000000 -0600
-@@ -296,7 +296,7 @@ class SeqOptimizer(Optimizer, list):
+--- ./theano/gof/opt.py.orig	2015-03-26 15:34:26.000000000 -0600
++++ ./theano/gof/opt.py	2015-03-31 21:00:00.000000000 -0600
+@@ -308,7 +308,7 @@ class SeqOptimizer(Optimizer, list):
                  new_sub_profile.append(None)
  
          # merge not common opt
@@ -94,8 +94,19 @@
          for l in set(prof1[0]).symmetric_difference(set(prof2[0])):
              #The set trick above only work for the same object optimization
              #It don't work for equivalent optimization.
---- ./theano/misc/pkl_utils.py.orig	2013-12-03 10:47:22.000000000 -0700
-+++ ./theano/misc/pkl_utils.py	2014-03-12 20:00:00.000000000 -0600
+--- ./theano/gof/type.py.orig	2015-03-26 15:34:27.000000000 -0600
++++ ./theano/gof/type.py	2015-03-31 21:00:00.000000000 -0600
+@@ -2,7 +2,7 @@
+ 
+ __docformat__ = "restructuredtext en"
+ 
+-from theano.compat import PY3
++from six import PY3
+ 
+ from theano.gof import utils
+ from theano.gof.utils import MethodNotDefined, object2
+--- ./theano/misc/pkl_utils.py.orig	2015-03-26 15:34:27.000000000 -0600
++++ ./theano/misc/pkl_utils.py	2015-03-31 21:00:00.000000000 -0600
 @@ -13,8 +13,7 @@ __license__ = "3-clause BSD"
  import pickle
  import sys
@@ -106,31 +117,31 @@
  
  
  sys.setrecursionlimit(3000)
---- ./theano/printing.py.orig	2013-12-03 10:47:22.000000000 -0700
-+++ ./theano/printing.py	2014-03-12 20:00:00.000000000 -0600
-@@ -25,7 +25,7 @@ except ImportError:
+--- ./theano/printing.py.orig	2015-03-26 15:34:27.000000000 -0600
++++ ./theano/printing.py	2015-03-31 21:00:00.000000000 -0600
+@@ -26,7 +26,7 @@ except ImportError:
  import theano
  from theano import gof
  from theano import config
 -from theano.compat.six import StringIO
 +from six import StringIO
  from theano.gof import Op, Apply
- from theano.gof.python25 import any
  from theano.compile import Function, debugmode
---- ./theano/sandbox/cuda/basic_ops.py.orig	2013-12-03 10:47:22.000000000 -0700
-+++ ./theano/sandbox/cuda/basic_ops.py	2014-03-12 20:00:00.000000000 -0600
-@@ -7,7 +7,7 @@ import numpy
- import theano
+ from theano.compile.profilemode import ProfileMode
+--- ./theano/sandbox/cuda/basic_ops.py.orig	2015-03-31 20:00:00.000000000 -0600
++++ ./theano/sandbox/cuda/basic_ops.py	2015-03-31 21:00:00.000000000 -0600
+@@ -8,7 +8,7 @@ import theano
+ 
  from theano import gof, Type, Apply
  from theano import tensor, scalar, config
 -from theano.compat.six import StringIO
 +from six import StringIO
+ from theano.gradient import grad_undefined
  from theano.scalar import Scalar
- scal = scalar # somewhere scalar gets reassigned to be a function
  
---- ./theano/sandbox/cuda/blas.py.orig	2013-12-03 10:47:22.000000000 -0700
-+++ ./theano/sandbox/cuda/blas.py	2014-03-12 20:00:00.000000000 -0600
-@@ -4,7 +4,7 @@ import os
+--- ./theano/sandbox/cuda/blas.py.orig	2015-03-26 15:34:27.000000000 -0600
++++ ./theano/sandbox/cuda/blas.py	2015-03-31 21:00:00.000000000 -0600
+@@ -6,7 +6,7 @@ _logger = logging.getLogger(__name__)
  import theano
  from theano import Apply
  from theano import tensor
@@ -138,30 +149,63 @@
 +from six import StringIO
  from theano.sandbox.cuda.type import CudaNdarrayType
  from theano.sandbox.cuda import GpuOp
- 
---- ./theano/sandbox/cuda/elemwise.py.orig	2013-12-03 10:47:22.000000000 -0700
-+++ ./theano/sandbox/cuda/elemwise.py	2014-03-12 20:00:00.000000000 -0600
+ from theano.sandbox.cuda.basic_ops import (as_cuda_ndarray_variable,
+--- ./theano/sandbox/cuda/elemwise.py.orig	2015-03-26 15:34:27.000000000 -0600
++++ ./theano/sandbox/cuda/elemwise.py	2015-03-31 21:00:00.000000000 -0600
 @@ -13,7 +13,7 @@ import numpy
  
  from theano.scalar.basic import upgrade_to_float_no_complex, complex_types
  from theano.scalar.basic_scipy import Erfinv
 -from theano.compat.six import StringIO
 +from six import StringIO
- from theano import Apply, Constant, Op, Type, Variable
- from theano import gof, scalar, tensor
+ from theano import Apply
+ from theano import gof, scalar
  
---- ./theano/sandbox/cuda/nnet.py.orig	2013-12-03 10:47:22.000000000 -0700
-+++ ./theano/sandbox/cuda/nnet.py	2014-03-12 20:00:00.000000000 -0600
+--- ./theano/sandbox/cuda/__init__.py.orig	2015-03-26 15:34:27.000000000 -0600
++++ ./theano/sandbox/cuda/__init__.py	2015-03-31 21:00:00.000000000 -0600
+@@ -7,7 +7,7 @@ import stat
+ import sys
+ 
+ import theano
+-from theano.compat import get_unbound_function
++from six import get_unbound_function
+ from theano.compile import optdb
+ from theano.gof import EquilibriumDB, SequenceDB
+ from theano.gof.cmodule import get_lib_extension
+--- ./theano/sandbox/cuda/nnet.py.orig	2015-03-26 15:34:27.000000000 -0600
++++ ./theano/sandbox/cuda/nnet.py	2015-03-31 21:00:00.000000000 -0600
 @@ -1,5 +1,5 @@
  from theano import Op, Apply
 -from theano.compat.six import StringIO
 +from six import StringIO
  
  from theano.sandbox.cuda import GpuOp
+ from theano.sandbox.cuda.basic_ops import as_cuda_ndarray_variable
+--- ./theano/sandbox/cuda/rng_curand.py.orig	2015-03-26 15:34:27.000000000 -0600
++++ ./theano/sandbox/cuda/rng_curand.py	2015-03-31 21:00:00.000000000 -0600
+@@ -9,7 +9,7 @@ __contact__ = "theano-dev at googlegroups.c
  
---- ./theano/sandbox/cuda/type.py.orig	2013-12-03 10:47:23.000000000 -0700
-+++ ./theano/sandbox/cuda/type.py	2014-03-12 20:00:00.000000000 -0600
-@@ -9,7 +9,7 @@ import theano
+ import numpy
+ import theano.gof
+-from theano.compat import PY3
++from six import PY3
+ from theano.compat.python2x import all
+ from theano.sandbox.cuda import CudaNdarrayType, GpuOp
+ from theano.tensor import (get_vector_length, cast, opt)
+--- ./theano/sandbox/cuda/tests/test_dnn.py.orig	2015-03-26 15:34:27.000000000 -0600
++++ ./theano/sandbox/cuda/tests/test_dnn.py	2015-03-31 21:00:00.000000000 -0600
+@@ -5,7 +5,7 @@ import numpy
+ from itertools import product
+ 
+ import theano
+-from theano.compat.six import StringIO
++from six import StringIO
+ from theano.compat.python2x import any
+ import theano.tensor as T
+ import theano.tests.unittest_tools as utt
+--- ./theano/sandbox/cuda/type.py.orig	2015-03-26 15:34:27.000000000 -0600
++++ ./theano/sandbox/cuda/type.py	2015-03-31 21:00:00.000000000 -0600
+@@ -10,7 +10,7 @@ import theano
  from theano import Type, Variable
  from theano import tensor, config
  from theano import scalar as scal
@@ -170,20 +214,75 @@
  
  try:
      # We must do those import to be able to create the full doc when nvcc
---- ./theano/tensor/opt.py.orig	2013-12-03 10:47:28.000000000 -0700
-+++ ./theano/tensor/opt.py	2014-03-12 20:00:00.000000000 -0600
-@@ -37,7 +37,7 @@ from theano.gof.opt import (Optimizer, p
+--- ./theano/sandbox/gpuarray/basic_ops.py.orig	2015-03-26 15:34:27.000000000 -0600
++++ ./theano/sandbox/gpuarray/basic_ops.py	2015-03-31 21:00:00.000000000 -0600
+@@ -12,7 +12,7 @@ from theano.tensor.basic import Alloc, J
+ from theano.gof import HideC
+ from theano.compat.python2x import any
+ from theano.gof.utils import MethodNotDefined
+-from theano.compat import PY3
++from six import PY3
+ 
+ try:
+     import pygpu
+--- ./theano/sandbox/gpuarray/nnet.py.orig	2015-03-26 15:34:27.000000000 -0600
++++ ./theano/sandbox/gpuarray/nnet.py	2015-03-31 21:00:00.000000000 -0600
+@@ -1,7 +1,7 @@
+ import numpy
+ 
+ from theano import Op, Apply, config
+-from theano.compat.six import StringIO
++from six import StringIO
+ from theano.sandbox.gpuarray.comp import NVCC_compiler
+ 
+ 
+--- ./theano/scalar/basic.py.orig	2015-03-26 15:34:27.000000000 -0600
++++ ./theano/scalar/basic.py	2015-03-31 21:00:00.000000000 -0600
+@@ -21,7 +21,7 @@ from textwrap import dedent
+ import numpy
+ 
+ import theano
+-from theano.compat import PY3
++from six import PY3
+ from theano import gof, printing
+ from theano.gof import (Op, utils, Variable, Constant, Type, Apply,
+                         FunctionGraph)
+--- ./theano/scan_module/tests/test_scan.py.orig	2015-03-26 15:34:28.000000000 -0600
++++ ./theano/scan_module/tests/test_scan.py	2015-03-31 21:00:00.000000000 -0600
+@@ -23,7 +23,7 @@ from theano.tests import unittest_tools
+ import theano.scalar.sharedvar
+ from theano.scan_module.scan_op import Scan
+ from theano.compat.python2x import OrderedDict
+-from theano.compat import PY3
++from six import PY3
+ 
+ from numpy.testing.noseclasses import KnownFailureTest
+ 
+--- ./theano/sparse/sandbox/test_sp.py.orig	2015-03-26 15:34:28.000000000 -0600
++++ ./theano/sparse/sandbox/test_sp.py	2015-03-31 21:00:00.000000000 -0600
+@@ -15,7 +15,7 @@ import numpy
+ 
+ from theano import function, tensor
+ import theano
+-from theano.compat import next
++from six import next
+ from theano.sparse.sandbox import sp
+ from theano.sparse.tests.test_basic import random_lil
+ from theano.tests import unittest_tools as utt
+--- ./theano/tensor/opt.py.orig	2015-03-26 15:34:28.000000000 -0600
++++ ./theano/tensor/opt.py	2015-03-31 21:00:00.000000000 -0600
+@@ -46,7 +46,7 @@ from theano.gof.opt import (Optimizer, p
  from theano.gof.opt import merge_optimizer
- from theano.gof import toolbox, DestroyHandler
+ from theano.gof import toolbox
  from theano.tensor.basic import get_scalar_constant_value, ShapeError, NotScalarConstantError
 -from theano.compat.six import StringIO
 +from six import StringIO
  
  theano.configparser.AddConfigVar('on_shape_error',
                                   "warn: print a warning and use the default"
---- ./theano/tensor/tests/test_basic.py.orig	2013-12-03 10:47:28.000000000 -0700
-+++ ./theano/tensor/tests/test_basic.py	2014-03-12 20:00:00.000000000 -0600
-@@ -18,8 +18,8 @@ from numpy.testing import dec, assert_ar
+--- ./theano/tensor/tests/test_basic.py.orig	2015-03-26 15:34:28.000000000 -0600
++++ ./theano/tensor/tests/test_basic.py	2015-03-31 21:00:00.000000000 -0600
+@@ -19,8 +19,8 @@ from numpy.testing import dec, assert_ar
  from numpy.testing.noseclasses import KnownFailureTest
  
  import theano
@@ -194,20 +293,9 @@
  from theano import compile, config, function, gof, tensor, shared
  from theano.compile import DeepCopyOp
  from theano.compile.mode import get_default_mode
---- ./theano/tensor/tests/test_naacl09.py.orig	2013-12-03 10:47:28.000000000 -0700
-+++ ./theano/tensor/tests/test_naacl09.py	2014-03-12 20:00:00.000000000 -0600
-@@ -652,7 +652,7 @@ def profile_main():
-     # We've renamed our original main() above to real_main()
-     import cProfile
-     import pstats
--    from theano.compat.six import StringIO
-+    from six import StringIO
-     prof = cProfile.Profile()
-     prof = prof.runctx("real_main()", globals(), locals())
-     stream = StringIO()
---- ./theano/tensor/tests/test_opt.py.orig	2013-12-03 10:47:28.000000000 -0700
-+++ ./theano/tensor/tests/test_opt.py	2014-03-12 20:00:00.000000000 -0600
-@@ -15,7 +15,7 @@ from numpy.testing.noseclasses import Kn
+--- ./theano/tensor/tests/test_opt.py.orig	2015-03-26 15:34:28.000000000 -0600
++++ ./theano/tensor/tests/test_opt.py	2015-03-31 21:00:00.000000000 -0600
+@@ -16,7 +16,7 @@ from numpy.testing.noseclasses import Kn
  
  import theano
  import theano.scalar as scal
@@ -216,19 +304,31 @@
  from theano import compile
  from theano.compile import deep_copy_op, DeepCopyOp
  from theano import config
---- ./theano/tensor/tests/test_subtensor.py.orig	2013-12-03 10:47:28.000000000 -0700
-+++ ./theano/tensor/tests/test_subtensor.py	2014-03-12 20:00:00.000000000 -0600
-@@ -8,7 +8,7 @@ import numpy
+--- ./theano/tensor/tests/test_subtensor.py.orig	2015-03-26 15:34:28.000000000 -0600
++++ ./theano/tensor/tests/test_subtensor.py	2015-03-31 21:00:00.000000000 -0600
+@@ -9,7 +9,7 @@ import numpy
  
  import theano
  from theano.compat import exc_message
 -from theano.compat.six import StringIO
 +from six import StringIO
- from theano.gof.python25 import any
+ from theano.compat.python2x import any
  from theano.compile import DeepCopyOp
  from theano import config
---- ./theano/tests/test_determinism.py.orig	2013-12-03 10:47:28.000000000 -0700
-+++ ./theano/tests/test_determinism.py	2014-03-12 20:00:00.000000000 -0600
+--- ./theano/tensor/var.py.orig	2015-03-26 15:34:28.000000000 -0600
++++ ./theano/tensor/var.py	2015-03-31 21:00:00.000000000 -0600
+@@ -7,7 +7,8 @@ import warnings
+ import numpy
+ 
+ import theano
+-from theano.compat import all, PY3
++from six import PY3
++from theano.compat import all
+ from theano.scalar import ComplexError, IntegerDivisionError
+ from theano.gof import Constant, Variable
+ from theano.gof.utils import hashtype
+--- ./theano/tests/test_determinism.py.orig	2015-03-26 15:34:28.000000000 -0600
++++ ./theano/tests/test_determinism.py	2015-03-31 21:00:00.000000000 -0600
 @@ -9,7 +9,7 @@ from nose.plugins.skip import SkipTest
  
  from theano import config
@@ -238,8 +338,8 @@
  
  def sharedX(x, name=None):
      x = np.cast[config.floatX](x)
---- ./theano/tests/test_printing.py.orig	2013-12-03 10:47:28.000000000 -0700
-+++ ./theano/tests/test_printing.py	2014-03-12 20:00:00.000000000 -0600
+--- ./theano/tests/test_printing.py.orig	2015-03-26 15:34:28.000000000 -0600
++++ ./theano/tests/test_printing.py	2015-03-31 21:00:00.000000000 -0600
 @@ -9,7 +9,7 @@ import theano
  import theano.tensor as tensor
  
@@ -247,5 +347,5 @@
 -from theano.compat.six import StringIO
 +from six import StringIO
  
+ 
  def test_pydotprint_cond_highlight():
-     """
diff --git a/python-theano.spec b/python-theano.spec
index 426aa17..6d342c0 100644
--- a/python-theano.spec
+++ b/python-theano.spec
@@ -2,8 +2,8 @@
 #%%global rctag rc3
 
 Name:           python-theano
-Version:        0.6.0
-Release:        5%{?rctag:.%{rctag}}%{?dist}
+Version:        0.7.0
+Release:        1%{?rctag:.%{rctag}}%{?dist}
 Summary:        Mathematical expressions involving multidimensional arrays
 
 License:        BSD
@@ -22,12 +22,11 @@ Source4:        badge2.png
 Patch0:         %{name}-doc.patch
 # Unbundle python-six
 Patch1:         %{name}-six.patch
-# Fix a build failure on arm due to an inverted test
-Patch2:         %{name}-arm.patch
 
 BuildArch:      noarch
 
 BuildRequires:  atlas-devel
+BuildRequires:  Cython python3-Cython
 BuildRequires:  epydoc
 BuildRequires:  numpy python3-numpy
 BuildRequires:  pydot
@@ -99,7 +98,6 @@ efficiently.  Theano features:
 %setup -q -n %{pkgname}-%{version}%{?rctag:.%{rctag}} -T -D -a 1
 %patch0
 %patch1
-%patch2
 
 # Don't use non-local images when building documentation
 cp -p %{SOURCE2} %{SOURCE3} %{SOURCE4} doc/images
@@ -123,16 +121,17 @@ done
 
 # Prepare for python 3 build
 cp -a . %{py3dir}
+mv %{py3dir} python3
 
 # We don't need to use /usr/bin/env
-for fil in $(grep -FRl /usr/bin/env .); do
-  sed 's,/usr/bin/env[[:blank:]]*python.*,/usr/bin/python2,' $fil > $fil.new
+for fil in $(grep -FRl /usr/bin/env python3); do
+  sed 's,/usr/bin/env[[:blank:]]*python.*,/usr/bin/python3,' $fil > $fil.new
   touch -r $fil $fil.new
   chmod a+x $fil.new
   mv -f $fil.new $fil
 done
-for fil in $(grep -FRl /usr/bin/env %{py3dir}); do
-  sed 's,/usr/bin/env[[:blank:]]*python.*,/usr/bin/python3,' $fil > $fil.new
+for fil in $(grep -FRl /usr/bin/env .); do
+  sed 's,/usr/bin/env[[:blank:]]*python.*,/usr/bin/python2,' $fil > $fil.new
   touch -r $fil $fil.new
   chmod a+x $fil.new
   mv -f $fil.new $fil
@@ -142,11 +141,22 @@ done
 # The python3 build fails with Unicode errors without this
 export LC_ALL=en_US.UTF-8
 
+# Regenerate the Cython files, and fix the numpy interfaces
+cython theano/scan_module/scan_perform.pyx
+pushd python3
+cython3 theano/scan_module/scan_perform.pyx
+popd
+sed -e 's/\(__pyx_v_self\)->descr/PyArray_DESCR(\1)/' \
+    -e 's/\(__pyx_v_arr\)->base = \(.*\);/PyArray_SetBaseObject(\1, \2);/' \
+    -e 's/\(__pyx_v_arr\)->base/PyArray_BASE(\1)/' \
+    -i theano/scan_module/scan_perform.c \
+       python3/theano/scan_module/scan_perform.c
+
 # Python 2 build
 python2 setup.py build
 
 # Python 3 build
-pushd %{py3dir}
+pushd python3
 python3 setup.py build
 popd
 
@@ -165,7 +175,7 @@ export LC_ALL=en_US.UTF-8
 python2 setup.py install -O1 --skip-build --root %{buildroot}
 
 # Install python 3 build
-pushd %{py3dir}
+pushd python3
 python3 setup.py install -O1 --skip-build --root %{buildroot}
 popd
 
@@ -175,8 +185,8 @@ chmod a+x $(find %{buildroot} -name \*.py -o -name \*.sh | xargs grep -l '^#!')
 # Theano's self tests currently fail one test.  Enable this once upstream has
 # fixed the problem.
 #
-#%%check
-#PYTHONPATH=$PWD bin/theano-test
+%check
+PYTHONPATH=$PWD bin/theano-test
 
 %files
 %doc DESCRIPTION.txt HISTORY.txt NEWS.txt README.txt
@@ -193,6 +203,11 @@ chmod a+x $(find %{buildroot} -name \*.py -o -name \*.sh | xargs grep -l '^#!')
 %{python3_sitelib}/*
 
 %changelog
+* Wed Apr  1 2015 Jerry James <loganjerry at gmail.com> - 0.7.0-1
+- New upstream release
+- Drop upstreamed -arm patch
+- Regenerate cython files to fix build failure
+
 * Sat Feb 21 2015 Jerry James <loganjerry at gmail.com> - 0.6.0-5
 - Add -arm patch to fix build failure on arm builders due to inverted test
 
diff --git a/sources b/sources
index 0167432..3fed2fc 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-44df6c476d8012290a2d5bb66611126a  Theano-0.6.0.tar.gz
-765e79f33d9f4e0d818fa411c17956e8  Theano-missing.tar.xz
+099a9575801b71252b5bbbc3c34ed45a  Theano-0.7.0.tar.gz
+a339688d21f37dd7f6398737c4eea528  Theano-missing.tar.xz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/python-theano.git/commit/?h=master&id=ad8e48218f9547b5faa4b8ab24f7bcdd7b215f3a


More information about the scm-commits mailing list