diff --git a/python3-numpy.changes b/python3-numpy.changes index c41c149..bddccd6 100644 --- a/python3-numpy.changes +++ b/python3-numpy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Dec 12 02:25:57 UTC 2012 - highwaystar.ru@gmail.com + +- regenerate mtrand.c with cython, needed for python3.3 compatibility + ------------------------------------------------------------------- Thu Nov 22 13:47:34 UTC 2012 - toddrme2178@gmail.com diff --git a/python3-numpy.spec b/python3-numpy.spec index da82d97..da913fb 100644 --- a/python3-numpy.spec +++ b/python3-numpy.spec @@ -34,6 +34,8 @@ BuildRequires: lapack-devel BuildRequires: python3 BuildRequires: python3-2to3 BuildRequires: python3-devel +# Cython needed for mtrand.c regenerating (python3.3) +BuildRequires: python3-Cython # FIXME: atlas is horribly broken # %if 0%{?suse_version} <= 1210 # BuildRequires: libatlas3-devel @@ -88,6 +90,21 @@ This package contains files for developing applications using %{modname}. %patch3 -p1 sed -i "1d" %{modname}/{compat/setup{,scons},distutils/{conv_template,cpuinfo,exec_command,from_template,setup,setupscons,system_info},f2py/{auxfuncs,capi_maps,cb_rules,cfuncs,common_rules,crackfortran,diagnose,docs/usersguide/setup_example,f2py2e,f90mod_rules,func2subr,__init__,rules,setup,setupscons,use_rules},ma/setup{,scons},matrixlib/setup{,scons},setup,setupscons,testing/print_coercion_tables,testing/setup{,scons}}.py # Fix non-executable scripts +# Fix from Fedora: +# Regenerate Cython c sources +# This is needed with numpy-1.6.2.tar.gz with python 3.3 to avoid an exception +# with an import call in the generated .c file in the tarball that uses the +# old default of -1: +# File "mtrand.pyx", line 126, in init mtrand (numpy/random/mtrand/mtrand.c:20679) +# ValueError: level must be >= 0 +# due to the changes in import in 3.3 +# Regenerating with a newer Cython fixes it: +%if 0%{?suse_version} && 0%{?suse_version} >= 1230 +pushd numpy/random/mtrand/ +rm -v mtrand.c +cython-%{py3_ver} mtrand.pyx +popd +%endif %build CFLAGS="%{optflags} -fno-strict-aliasing" python3 setup.py build