%global modname lasagne %global srcname Lasagne # To have all examples/licenses/etc. in one directory %global _docdir_fmt %{name} Name: python-%{modname} Version: 0.1 Release: 2%{?dist} Summary: Lightweight library to build and train neural networks in Theano License: MIT URL: https://github.com/Lasagne/%{srcname} Source0: %{url}/archive/v%{version}/%{modname}-%{version}.tar.gz BuildArch: noarch %description Lasagne is a lightweight library to build and train neural networks in Theano. Its main features are: Supports feed-forward networks such as Convolutional Neural Networks (CNNs), recurrent networks including Long Short-Term Memory (LSTM), and any combination thereof Allows architectures of multiple inputs and multiple outputs, including auxiliary classifiers Many optimization methods including Nesterov momentum, RMSprop and ADAM Freely definable cost function and no need to derive gradients due to Theano's symbolic differentiation Transparent support of CPUs and GPUs due to Theano's expression compiler %package -n python2-%{modname} Summary: Lightweight library to build and train neural networks in Theano %{?python_provide:%python_provide python2-%{modname}} %{?python_provide:%python_provide python2-%{srcname}} BuildRequires: python2-devel BuildRequires: python2-setuptools Requires: python2-theano %description -n python2-%{modname} Lasagne is a lightweight library to build and train neural networks in Theano. Its main features are: Supports feed-forward networks such as Convolutional Neural Networks (CNNs), recurrent networks including Long Short-Term Memory (LSTM), and any combination thereof Allows architectures of multiple inputs and multiple outputs, including auxiliary classifiers Many optimization methods including Nesterov momentum, RMSprop and ADAM Freely definable cost function and no need to derive gradients due to Theano's symbolic differentiation Transparent support of CPUs and GPUs due to Theano's expression compiler This package allows for use of python-lasagne with Python 2. %package -n python3-%{modname} Summary: Lightweight library to build and train neural networks in Theano %{?python_provide:%python_provide python3-%{modname}} %{?python_provide:%python_provide python3-%{srcname}} BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-theano %description -n python3-%{modname} Lasagne is a lightweight library to build and train neural networks in Theano. Its main features are: Supports feed-forward networks such as Convolutional Neural Networks (CNNs), recurrent networks including Long Short-Term Memory (LSTM), and any combination thereof Allows architectures of multiple inputs and multiple outputs, including auxiliary classifiers Many optimization methods including Nesterov momentum, RMSprop and ADAM Freely definable cost function and no need to derive gradients due to Theano's symbolic differentiation Transparent support of CPUs and GPUs due to Theano's expression compiler This package allows for use of python-lasagne with Python 3. %prep %autosetup -n %{srcname}-%{version} chmod -x examples/* sed -i -e '1{\@^#!/usr/bin/env python@d}' examples/*.py %build %py2_build %py3_build %install %py2_install %py3_install %check # Tests requiring CUDA or pylearn2. Those are not packaged #%{__python2} setup.py test #%{__python3} setup.py test %files -n python2-%{modname} %license LICENSE %doc docs/ examples/ CHANGES.rst %{python2_sitelib}/%{modname}/ %{python2_sitelib}/%{srcname}-%{version}-*.egg-info/ %files -n python3-%{modname} %license LICENSE %doc docs/ examples/ CHANGES.rst %{python3_sitelib}/%{modname}/ %{python3_sitelib}/%{srcname}-%{version}-*.egg-info/ %changelog * Sun Apr 10 2016 Igor Gnatenko - 0.1-2 - Follow packaging guidelines - Other cleanups * Thu Apr 07 2016 Jon Ciesla - 0.1-1 - Initial RPM release