|
Jerry James |
2181a57 |
%global pkgname Theano
|
|
|
df74587 |
%global srcname theano
|
|
|
70e2d03 |
#%%global rctag a1
|
|
Jerry James |
2181a57 |
|
|
Jerry James |
2181a57 |
Name: python-theano
|
|
|
8dd79dc |
Version: 1.0.0
|
|
|
8dd79dc |
Release: 1%{?rctag:.%{rctag}}%{?dist}
|
|
Jerry James |
2181a57 |
Summary: Mathematical expressions involving multidimensional arrays
|
|
Jerry James |
2181a57 |
|
|
Jerry James |
2181a57 |
License: BSD
|
|
Jerry James |
2181a57 |
URL: http://deeplearning.net/software/theano/
|
|
|
94bdf82 |
Source0: https://github.com/Theano/Theano/archive/rel-%{version}%{?rctag:%{rctag}}/%{pkgname}-%{version}%{?rctag:%{rctag}}.tar.gz
|
|
Jerry James |
2181a57 |
|
|
Jerry James |
2181a57 |
BuildArch: noarch
|
|
Jerry James |
2181a57 |
|
|
Jerry James |
2181a57 |
BuildRequires: atlas-devel
|
|
Jerry James |
2181a57 |
BuildRequires: epydoc
|
|
|
70e2d03 |
BuildRequires: gcc-c++
|
|
|
70e2d03 |
BuildRequires: gcc-gfortran
|
|
|
33d1a2b |
BuildRequires: git-core
|
|
|
70e2d03 |
BuildRequires: python2-Cython python3-Cython
|
|
Jerry James |
be8f770 |
BuildRequires: python2-devel python3-devel
|
|
|
70e2d03 |
BuildRequires: python2-nose python3-nose
|
|
|
e4bfaa1 |
BuildRequires: python2-parameterized python3-parameterized
|
|
|
70e2d03 |
BuildRequires: python2-numpy python3-numpy
|
|
|
08412dd |
BuildRequires: python2-pydot python3-pydot
|
|
|
70e2d03 |
BuildRequires: python2-scipy python3-scipy
|
|
|
70e2d03 |
BuildRequires: python2-setuptools python3-setuptools
|
|
|
70e2d03 |
BuildRequires: python2-six python3-six
|
|
|
33d1a2b |
BuildRequires: python3-sphinx
|
|
|
70e2d03 |
BuildRequires: tex(latex)
|
|
|
33d1a2b |
BuildRequires: tex(anyfontsize.sty)
|
|
Jerry James |
2181a57 |
BuildRequires: tex-dvipng
|
|
Jerry James |
2181a57 |
|
|
|
df74587 |
%description
|
|
|
df74587 |
Theano is a Python library that allows you to define, optimize, and
|
|
|
df74587 |
evaluate mathematical expressions involving multi-dimensional arrays
|
|
|
df74587 |
efficiently. Theano features:
|
|
|
df74587 |
- tight integration with NumPy: Use numpy.ndarray in Theano-compiled
|
|
|
df74587 |
functions.
|
|
|
df74587 |
- transparent use of a GPU: Perform data-intensive calculations up to
|
|
|
df74587 |
140x faster than with CPU.(float32 only)
|
|
|
df74587 |
- efficient symbolic differentiation: Theano does your derivatives for
|
|
|
df74587 |
function with one or many inputs.
|
|
|
df74587 |
- speed and stability optimizations: Get the right answer for log(1+x)
|
|
|
df74587 |
even when x is really tiny.
|
|
|
df74587 |
- dynamic C code generation: Evaluate expressions faster.
|
|
|
df74587 |
- extensive unit-testing and self-verification: Detect and diagnose many
|
|
|
df74587 |
types of mistake.
|
|
|
df74587 |
|
|
|
df74587 |
%package -n python2-%{srcname}
|
|
|
df74587 |
Summary: Mathematical expressions involving multidimensional arrays
|
|
Jerry James |
2181a57 |
Requires: atlas-devel
|
|
Jerry James |
2181a57 |
Requires: gcc-c++
|
|
Jerry James |
2181a57 |
Requires: gcc-gfortran
|
|
|
70e2d03 |
Requires: python2-numpy
|
|
|
70e2d03 |
Requires: python2-scipy
|
|
|
08412dd |
Requires: python2-six
|
|
Jerry James |
2181a57 |
|
|
|
e808ddb |
Recommends: python2-pydot
|
|
|
e808ddb |
|
|
|
df74587 |
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
df74587 |
|
|
|
df74587 |
%description -n python2-%{srcname}
|
|
Jerry James |
2181a57 |
Theano is a Python library that allows you to define, optimize, and
|
|
Jerry James |
2181a57 |
evaluate mathematical expressions involving multi-dimensional arrays
|
|
Jerry James |
2181a57 |
efficiently. Theano features:
|
|
Jerry James |
2181a57 |
- tight integration with NumPy: Use numpy.ndarray in Theano-compiled
|
|
Jerry James |
2181a57 |
functions.
|
|
Jerry James |
2181a57 |
- transparent use of a GPU: Perform data-intensive calculations up to
|
|
Jerry James |
2181a57 |
140x faster than with CPU.(float32 only)
|
|
Jerry James |
2181a57 |
- efficient symbolic differentiation: Theano does your derivatives for
|
|
Jerry James |
2181a57 |
function with one or many inputs.
|
|
Jerry James |
2181a57 |
- speed and stability optimizations: Get the right answer for log(1+x)
|
|
Jerry James |
2181a57 |
even when x is really tiny.
|
|
Jerry James |
2181a57 |
- dynamic C code generation: Evaluate expressions faster.
|
|
Jerry James |
2181a57 |
- extensive unit-testing and self-verification: Detect and diagnose many
|
|
Jerry James |
2181a57 |
types of mistake.
|
|
Jerry James |
2181a57 |
|
|
|
df74587 |
%package -n python3-%{srcname}
|
|
Jerry James |
be8f770 |
Summary: Mathematical expressions involving multidimensional arrays
|
|
Jerry James |
be8f770 |
Requires: atlas-devel
|
|
Jerry James |
be8f770 |
Requires: gcc-c++
|
|
Jerry James |
be8f770 |
Requires: gcc-gfortran
|
|
Jerry James |
be8f770 |
Requires: python3-numpy
|
|
Jerry James |
be8f770 |
Requires: python3-scipy
|
|
Jerry James |
be8f770 |
Requires: python3-six
|
|
Jerry James |
be8f770 |
|
|
|
e808ddb |
Recommends: python3-pydot
|
|
|
e808ddb |
|
|
|
df74587 |
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
df74587 |
|
|
|
df74587 |
%description -n python3-%{srcname}
|
|
Jerry James |
be8f770 |
Theano is a Python library that allows you to define, optimize, and
|
|
Jerry James |
be8f770 |
evaluate mathematical expressions involving multi-dimensional arrays
|
|
Jerry James |
be8f770 |
efficiently. Theano features:
|
|
Jerry James |
be8f770 |
- tight integration with NumPy: Use numpy.ndarray in Theano-compiled
|
|
Jerry James |
be8f770 |
functions.
|
|
Jerry James |
be8f770 |
- transparent use of a GPU: Perform data-intensive calculations up to
|
|
Jerry James |
be8f770 |
140x faster than with CPU.(float32 only)
|
|
Jerry James |
be8f770 |
- efficient symbolic differentiation: Theano does your derivatives for
|
|
Jerry James |
be8f770 |
function with one or many inputs.
|
|
Jerry James |
be8f770 |
- speed and stability optimizations: Get the right answer for log(1+x)
|
|
Jerry James |
be8f770 |
even when x is really tiny.
|
|
Jerry James |
be8f770 |
- dynamic C code generation: Evaluate expressions faster.
|
|
Jerry James |
be8f770 |
- extensive unit-testing and self-verification: Detect and diagnose many
|
|
Jerry James |
be8f770 |
types of mistake.
|
|
Jerry James |
be8f770 |
|
|
|
df74587 |
%package doc
|
|
|
df74587 |
Summary: Theano documentation
|
|
|
df74587 |
|
|
|
df74587 |
%description doc
|
|
|
df74587 |
User documentation for Theano.
|
|
|
df74587 |
|
|
Jerry James |
2181a57 |
%prep
|
|
|
8583ad1 |
%autosetup -n %{pkgname}-rel-%{version}%{?rctag:%{rctag}} -p1
|
|
Jerry James |
2181a57 |
|
|
Jerry James |
be8f770 |
# Remove bundled python-six
|
|
Jerry James |
be8f770 |
rm -f theano/compat/six.py
|
|
Jerry James |
be8f770 |
|
|
|
e808ddb |
# We don't need to use /usr/bin/env
|
|
|
e808ddb |
for fil in $(grep -FRl /bin/env .); do
|
|
|
e808ddb |
sed -ri.orig 's,( )?(/usr)?/bin/env[[:blank:]]*python.*,%{_bindir}/python2,' $fil
|
|
|
e808ddb |
touch -r $fil.orig $fil
|
|
|
e808ddb |
rm $fil.orig
|
|
|
e808ddb |
done
|
|
|
e808ddb |
|
|
|
e808ddb |
# Be explicit about the python version to invoke
|
|
|
e808ddb |
for fil in $(grep -Rl '^#!%{_bindir}/python$' .); do
|
|
|
e808ddb |
sed -i.orig 's,^#!%{_bindir}/python$,&2,' $fil
|
|
|
e808ddb |
touch -r $fil.orig $fil
|
|
|
e808ddb |
rm $fil.orig
|
|
|
e808ddb |
done
|
|
|
e808ddb |
|
|
Jerry James |
be8f770 |
# Prepare for python 3 build
|
|
Jerry James |
be8f770 |
cp -a . %{py3dir}
|
|
Jerry James |
ad8e482 |
mv %{py3dir} python3
|
|
Jerry James |
be8f770 |
|
|
|
e808ddb |
# Change dependencies for python3
|
|
|
e808ddb |
for fil in $(grep -Rl '#!%{_bindir}/python2' python3); do
|
|
|
e808ddb |
sed -i.orig 's,#!%{_bindir}/python2,#!%{_bindir}/python3,' $fil
|
|
|
e808ddb |
touch -r $fil.orig $fil
|
|
|
e808ddb |
rm $fil.orig
|
|
Jerry James |
2181a57 |
done
|
|
Jerry James |
2181a57 |
|
|
Jerry James |
2181a57 |
%build
|
|
Jerry James |
ad8e482 |
# Regenerate the Cython files, and fix the numpy interfaces
|
|
Jerry James |
ad8e482 |
cython theano/scan_module/scan_perform.pyx
|
|
Jerry James |
ad8e482 |
pushd python3
|
|
Jerry James |
ad8e482 |
cython3 theano/scan_module/scan_perform.pyx
|
|
Jerry James |
ad8e482 |
popd
|
|
Jerry James |
ad8e482 |
sed -e 's/\(__pyx_v_self\)->descr/PyArray_DESCR(\1)/' \
|
|
Jerry James |
ad8e482 |
-e 's/\(__pyx_v_arr\)->base = \(.*\);/PyArray_SetBaseObject(\1, \2);/' \
|
|
Jerry James |
ad8e482 |
-e 's/\(__pyx_v_arr\)->base/PyArray_BASE(\1)/' \
|
|
Jerry James |
ad8e482 |
-i theano/scan_module/scan_perform.c \
|
|
Jerry James |
ad8e482 |
python3/theano/scan_module/scan_perform.c
|
|
Jerry James |
ad8e482 |
|
|
Jerry James |
be8f770 |
# Python 2 build
|
|
|
df74587 |
%py2_build
|
|
Jerry James |
be8f770 |
|
|
Jerry James |
be8f770 |
# Python 3 build
|
|
Jerry James |
ad8e482 |
pushd python3
|
|
|
df74587 |
%py3_build
|
|
Jerry James |
be8f770 |
popd
|
|
Jerry James |
2181a57 |
|
|
Jerry James |
2181a57 |
# Build the documentation
|
|
Jerry James |
2181a57 |
export PYTHONPATH=$PWD
|
|
|
33d1a2b |
python3 doc/scripts/docgen.py --nopdf
|
|
Jerry James |
2181a57 |
|
|
Jerry James |
2181a57 |
# Remove build artifacts
|
|
Jerry James |
2181a57 |
rm -fr html/.buildinfo html/.doctrees
|
|
Jerry James |
2181a57 |
|
|
Jerry James |
2181a57 |
%install
|
|
Jerry James |
be8f770 |
# Install python 2 build
|
|
|
df74587 |
%py2_install
|
|
Jerry James |
be8f770 |
|
|
Jerry James |
be8f770 |
# Install python 3 build
|
|
Jerry James |
ad8e482 |
pushd python3
|
|
|
df74587 |
%py3_install
|
|
Jerry James |
be8f770 |
popd
|
|
Jerry James |
2181a57 |
|
|
Jerry James |
2181a57 |
# Restore executable permission on the scripts
|
|
Jerry James |
2181a57 |
chmod a+x $(find %{buildroot} -name \*.py -o -name \*.sh | xargs grep -l '^#!')
|
|
Jerry James |
2181a57 |
|
|
Jerry James |
ad8e482 |
%check
|
|
|
33d1a2b |
PYTHONPATH=$PWD bin/theano-nose
|
|
Jerry James |
2181a57 |
|
|
|
df74587 |
%files -n python2-%{srcname}
|
|
|
f5f4997 |
%doc DESCRIPTION.txt HISTORY.txt NEWS.txt README.txt
|
|
|
f5f4997 |
%license doc/LICENSE.txt
|
|
Jerry James |
be8f770 |
%{python2_sitelib}/*
|
|
Jerry James |
2181a57 |
|
|
|
df74587 |
%files -n python3-%{srcname}
|
|
|
f5f4997 |
%doc DESCRIPTION.txt HISTORY.txt NEWS.txt README.txt
|
|
|
f5f4997 |
%license doc/LICENSE.txt
|
|
Jerry James |
be8f770 |
%{_bindir}/theano-*
|
|
Jerry James |
be8f770 |
%{python3_sitelib}/*
|
|
Jerry James |
be8f770 |
|
|
|
df74587 |
%files doc
|
|
|
df74587 |
%doc html
|
|
|
df74587 |
|
|
Jerry James |
2181a57 |
%changelog
|
|
|
8dd79dc |
* Fri Nov 17 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.0.0-1
|
|
|
8dd79dc |
- Update to 1.0.0
|
|
|
8dd79dc |
|
|
|
3adf02b |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-1.1
|
|
|
3adf02b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
3adf02b |
|
|
|
33d1a2b |
* Wed Mar 22 2017 Jerry James <loganjerry@gmail.com> - 0.9.0-1
|
|
|
33d1a2b |
- New upstream release
|
|
|
33d1a2b |
|
|
|
a731d6c |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-1.3
|
|
|
a731d6c |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
a731d6c |
|
|
|
c9b2a1e |
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.8.2-1.2
|
|
|
c9b2a1e |
- Rebuild for Python 3.6
|
|
|
c9b2a1e |
|
|
|
7e9efdc |
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.2-1.1
|
|
|
7e9efdc |
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
7e9efdc |
|
|
|
55e692d |
* Thu Apr 21 2016 Jerry James <loganjerry@gmail.com> - 0.8.2-1
|
|
|
55e692d |
- New upstream release
|
|
|
55e692d |
|
|
|
e808ddb |
* Fri Apr 15 2016 Jerry James <loganjerry@gmail.com> - 0.8.1-2
|
|
|
e808ddb |
- Remove python2 dependency from the python3 subpackage (bz 1324232)
|
|
|
e808ddb |
- Recommend pydot instead of requiring it
|
|
|
e808ddb |
|
|
|
08412dd |
* Sat Apr 2 2016 Jerry James <loganjerry@gmail.com> - 0.8.1-1
|
|
|
08412dd |
- New upstream release
|
|
|
08412dd |
- Fix the pydot dependencies
|
|
|
08412dd |
|
|
|
70e2d03 |
* Wed Mar 23 2016 Jerry James <loganjerry@gmail.com> - 0.8.0-1
|
|
|
70e2d03 |
- New upstream release
|
|
|
70e2d03 |
|
|
|
1f84a83 |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-0.2.a1
|
|
|
1f84a83 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
1f84a83 |
|
|
|
df74587 |
* Mon Feb 1 2016 Jerry James <loganjerry@gmail.com> - 0.7.1-0.1.a1
|
|
|
df74587 |
- Comply with latest python packaging guidelines
|
|
|
df74587 |
|
|
|
94bdf82 |
* Thu Nov 12 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.7.1-0.1.a1
|
|
|
94bdf82 |
- Update to 0.7.1a1
|
|
|
94bdf82 |
|
|
|
8da3af2 |
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-2.2
|
|
|
8da3af2 |
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
|
8da3af2 |
|
|
|
df74587 |
* Wed Nov 4 2015 Toshio Kuratomi <toshio@fedoraproject.org> - 0.7.0-2.1
|
|
|
eeed55b |
- Fix python3 package requiring python2.
|
|
|
eeed55b |
|
|
|
a829163 |
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-1.1
|
|
|
a829163 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
a829163 |
|
|
Jerry James |
ad8e482 |
* Wed Apr 1 2015 Jerry James <loganjerry@gmail.com> - 0.7.0-1
|
|
Jerry James |
ad8e482 |
- New upstream release
|
|
Jerry James |
ad8e482 |
- Drop upstreamed -arm patch
|
|
Jerry James |
ad8e482 |
- Regenerate cython files to fix build failure
|
|
Jerry James |
ad8e482 |
|
|
|
410c310 |
* Sat Feb 21 2015 Jerry James <loganjerry@gmail.com> - 0.6.0-5
|
|
|
410c310 |
- Add -arm patch to fix build failure on arm builders due to inverted test
|
|
|
410c310 |
|
|
|
f5f4997 |
* Sat Feb 21 2015 Jerry James <loganjerry@gmail.com> - 0.6.0-4
|
|
|
f5f4997 |
- Drop workaround for fixed bug (bz 1075826)
|
|
|
f5f4997 |
- Use license macro
|
|
|
f5f4997 |
|
|
|
f517f04 |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-3.1
|
|
|
f517f04 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
f517f04 |
|
|
Jerry James |
fd4a43f |
* Wed May 14 2014 Jerry James <loganjerry@gmail.com> - 0.6.0-3
|
|
Jerry James |
fd4a43f |
- Rebuild for https://fedoraproject.org/wiki/Changes/Python_3.4
|
|
Jerry James |
fd4a43f |
|
|
Jerry James |
be8f770 |
* Thu Mar 13 2014 Jerry James <loganjerry@gmail.com> - 0.6.0-2
|
|
Jerry James |
be8f770 |
- Add python3 subpackage
|
|
Jerry James |
be8f770 |
- Add another icon to the -missing tarball
|
|
Jerry James |
be8f770 |
- Update source icons
|
|
Jerry James |
be8f770 |
- Unbundle python-six
|
|
Jerry James |
be8f770 |
- Add workaround for bz 1075826
|
|
Jerry James |
be8f770 |
|
|
|
bfed893 |
* Sat Dec 7 2013 Jerry James <loganjerry@gmail.com> - 0.6.0-1
|
|
|
bfed893 |
- New upstream release
|
|
|
bfed893 |
- Drop upstreamed -import patch
|
|
|
bfed893 |
|
|
Jerry James |
2181a57 |
* Mon Oct 21 2013 Jerry James <loganjerry@gmail.com> - 0.6.0-0.1.rc3
|
|
Jerry James |
2181a57 |
- Add the -import patch to fix an exception
|
|
Jerry James |
2181a57 |
- Add more files to the base package docs
|
|
Jerry James |
2181a57 |
|
|
Jerry James |
2181a57 |
* Tue Aug 27 2013 Jerry James <loganjerry@gmail.com> - 0.6.0-0.rc3
|
|
Jerry James |
2181a57 |
- Initial RPM
|