diff --git a/python-theano-blas.patch b/python-theano-blas.patch index 48a3028..034d519 100644 --- a/python-theano-blas.patch +++ b/python-theano-blas.patch @@ -1,6 +1,6 @@ --- theano/configdefaults.py.orig 2018-05-23 08:05:50.000000000 -0600 +++ theano/configdefaults.py 2018-05-23 20:20:54.280886303 -0600 -@@ -1274,221 +1274,13 @@ sure you have the right version you *wil +@@ -1274,221 +1274,8 @@ sure you have the right version you *wil def default_blas_ldflags(): @@ -219,12 +219,7 @@ - # than disable blas. To test it correctly, we must load a program. - # Otherwise, there could be problem in the LD_LIBRARY_PATH. - return try_blas_flag(['-lblas']) -+ flags = [] -+ if os.path.isdir('/usr/lib64/atlas'): -+ flags += ['-L/usr/lib64/atlas'] -+ else: -+ flags += ['-L/usr/lib/atlas'] -+ flags += ['-lsatlas'] ++ flags = ['-lopenblaso'] + return try_blas_flag(flags) diff --git a/python-theano-flake8.patch b/python-theano-flake8.patch new file mode 100644 index 0000000..f866db0 --- /dev/null +++ b/python-theano-flake8.patch @@ -0,0 +1,23 @@ +--- setup.cfg.orig 2018-05-23 08:05:50.000000000 -0600 ++++ setup.cfg 2018-08-26 21:58:48.079501195 -0600 +@@ -3,7 +3,7 @@ match=^test + nocapture=1 + + [flake8] +-ignore=E501,E123,E133,FI12,FI14,FI15,FI50,FI51,FI53 ++ignore=E501,E123,E133,E305,E741,E742,FI12,FI14,FI15,FI50,FI51,FI53,F401,F403,F405,F811,F821,F841,W504,W605 + + [versioneer] + VCS = git +--- theano/tests/test_flake8.py.orig 2018-05-23 08:05:50.000000000 -0600 ++++ theano/tests/test_flake8.py 2018-08-26 22:01:12.471425852 -0600 +@@ -38,7 +38,8 @@ __contact__ = "Saizheng Zhang = 1.9.1 -BuildRequires: python3dist(scipy) >= 0.14 -BuildRequires: python3dist(six) >= 1.9.0 -BuildRequires: python3dist(nose) >= 1.3.0 -BuildRequires: python3dist(parameterized) -BuildRequires: python3dist(flake8) +Requires: openblas-devel +Requires: gcc-c++ +Requires: gcc-gfortran +Requires: python3dist(numpy) +Requires: python3dist(pygpu) +Requires: python3dist(scipy) +Requires: python3dist(six) -Suggests: python%{python3_version}dist(pydot) +Suggests: python3dist(pydot) %{?python_provide:%python_provide python3-%{srcname}} +# This can be removed when F29 reaches EOL +Obsoletes: python2-%{srcname} < 1.0.3 +Provides: python2-%{srcname} = %{version}-%{release} + %description -n python3-%{srcname} Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays @@ -72,12 +93,6 @@ efficiently. Theano features: %package doc Summary: Theano documentation -BuildRequires: python3dist(sphinx) >= 0.5.1 -BuildRequires: python3dist(pygments) -BuildRequires: tex(latex) -BuildRequires: tex(anyfontsize.sty) -BuildRequires: tex-dvipng -BuildRequires: epydoc %description doc User documentation for Theano. @@ -85,9 +100,6 @@ User documentation for Theano. %prep %autosetup -n %{pkgname}-rel-%{version}%{?rctag:%{rctag}} -p0 -# Remove bundled python-six -rm -f theano/compat/six.py - # We don't need to use /usr/bin/env for fil in $(grep -FRl /bin/env .); do sed -ri.orig 's,( )?(/usr)?/bin/env[[:blank:]]*python.*,%{_bindir}/python3,' $fil @@ -95,20 +107,14 @@ for fil in $(grep -FRl /bin/env .); do rm $fil.orig done -# Be explicit about the python version to invoke -for fil in $(grep -Rl '^#!%{_bindir}/python$' .); do - sed -i.orig 's,^#!%{_bindir}/python$,&3,' $fil - touch -r $fil.orig $fil - rm $fil.orig -done - %build # Regenerate the Cython files, and fix the numpy interfaces -cython theano/scan_module/scan_perform.pyx +cython -3 -o theano/scan_module/c_code/scan_perform.c \ + theano/scan_module/scan_perform.pyx 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 + -i theano/scan_module/c_code/scan_perform.c %py3_build @@ -134,11 +140,19 @@ PYTHONPATH=$PWD %{__python3} bin/theano-nose --processes=0 --process-restartwork %{_bindir}/theano-* %{python3_sitelib}/Theano-*.egg-info/ %{python3_sitelib}/theano/ +%{python3_sitelib}/bin/ %files doc %doc html %changelog +* Sat Oct 6 2018 Jerry James - 1.0.3-1 +- New upstream release +- Partially revert the previous commit; the gcc Requires is needed +- Build with openblas instead of atlas +- Send cython output to the correct directory +- Build with pygpu support + * Sun Aug 12 2018 Igor Gnatenko - 1.0.2-2 - Drop python2 subpackage diff --git a/sources b/sources index 16a3b34..9c23daf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Theano-1.0.2.tar.gz) = e94bf9747d3c4c000b950bf0429ed42c351f2ce5f0fd089eafea2140d4352616e5f3c15db5ef00f813cef1578e5d1010eb0ab27e857186784d6a9b61ff0f35d3 +SHA512 (Theano-1.0.3.tar.gz) = 8be55b773a3bccfd63cb2cf4e89cb94a852fe6b81a41cd11b61eab340568b783e0bafac25b9d0a627a2243cc8e67cb81e81340cf6674af46ea1652acdd2e274f