%if 0%{?fedora} %global with_python3 1 %endif Name: python-fn Version: 0.2.12 Release: 5%{?dist} Summary: Features to allow functional programming in Python Group: Development/Libraries License: ASL 2.0 URL: https://github.com/kachayev/fn.py Source0: https://pypi.python.org/packages/source/f/fn/fn-%{version}.tar.gz BuildRequires: python2-devel python-setuptools BuildArch: noarch %description Despite the fact that Python is not pure-functional programming language, it's a multi-paradigm PL and it gives you enough freedom to take credits from functional programming approach. There are theoretical and practical advantages to the functional style: - Formal provability - Modularity - Composability - Ease of debugging and testing Fn.py library provides you with missing "batteries" to get maximum from functional approach even in mostly-imperative program. %if 0%{?with_python3} %package -n python3-fn Summary: Features to allow functional programming in Python Group: Development/Libraries BuildRequires: python3-devel python3-setuptools %endif %description -n python3-fn Despite the fact that Python is not pure-functional programming language, it's a multi-paradigm PL and it gives you enough freedom to take credits from functional programming approach. There are theoretical and practical advantages to the functional style: - Formal provability - Modularity - Composability - Ease of debugging and testing Fn.py library provides you with missing "batteries" to get maximum from functional approach even in mostly-imperative program. %prep %setup -q -n fn-%{version} rm -rf *egg-info %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif %build %{__python} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif %install %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root %{buildroot} popd %endif %check %{__python} tests.py %if 0%{?with_python3} pushd %{py3dir} %{__python3} tests.py popd %endif %{__python} setup.py install -O1 --skip-build --root %{buildroot} %files %doc HISTORY.rst README.rst LICENSE %{python_sitelib}/fn/ %{python_sitelib}/fn-%{version}* %if 0%{?with_python3} %files -n python3-fn %doc HISTORY.rst README.rst LICENSE %{python3_sitelib}/fn/ %{python3_sitelib}/fn-%{version}* %endif %changelog * Mon Jul 15 2013 Ricky Elrod - 0.2.12-5 - Make it noarch. * Mon Jul 15 2013 Ricky Elrod - 0.2.12-4 - Run the tests. * Mon Jul 15 2013 Ricky Elrod - 0.2.12-3 - Add doc line to python3 subpackage files. - Nuke prebuilt egg. - Use python-devel2 instead of python-devel. - Dep on python-setuptools and python3-setuptools. * Mon Jul 15 2013 Ricky Elrod - 0.2.12-2 - Add python3 subpackage. * Mon Jul 15 2013 Ricky Elrod - 0.2.12-1 - Initial build.