%global modname portalocker Name: python-%{modname} Version: 0.5.6 Release: 1%{?dist} Summary: Library to provide an easy API to file locking License: Python URL: https://github.com/WoLpH/portalocker Source0: %{url}/archive/v%{version}/%{modname}-%{version}.tar.gz BuildArch: noarch %description %{summary}. %package -n python2-%{modname} Summary: %{summary} %{?python_provide:%python_provide python2-%{modname}} BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python2-pytest %description -n python2-%{modname} %{summary}. Python 2 version. %package -n python3-%{modname} Summary: %{summary} %{?python_provide:%python_provide python3-%{modname}} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pytest %description -n python3-%{modname} %{summary}. Python 3 version. %package doc Summary: Documentation for %{name} BuildRequires: /usr/bin/sphinx-build %description doc %{summary}. %prep %autosetup -n %{modname}-%{version} sed -i -e '/--/d' pytest.ini %build %py2_build %py3_build sphinx-build -b html docs html %install %py2_install %py3_install rm -f html/.buildinfo %check %{__python2} setup.py test %{__python3} setup.py test %files -n python2-%{modname} %license LICENSE %doc CHANGELOG README.rst %{python2_sitelib}/%{modname}* %files -n python3-%{modname} %license LICENSE %doc CHANGELOG README.rst %{python3_sitelib}/%{modname}* %files doc %doc html %changelog * Thu Jun 16 2016 Igor Gnatenko - 0.5.6-1 - Update to 0.5.6 - Add doc subpkg * Sun Dec 06 2015 Igor Gnatenko - 0.5.4-1.gitb0de666 - Initial package