%if 0%{?fedora} > 12 %global with_python3 1 %endif %global pypi_name fasteners Name: python-%{pypi_name} Version: 0.14.1 Release: 3%{?dist} Summary: A python package that provides useful locks License: ASL 2.0 URL: https://github.com/harlowja/fasteners Source0: https://codeload.github.com/harlowja/fasteners/tar.gz/%{version}#/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-six Requires: python-six # tests: BuildRequires: python-testtools BuildRequires: python-nose %description A python package that provides useful locks. %package -n python2-%{pypi_name} Summary: A python package that provides useful locks Obsoletes: python-%{pypi_name} < 0.13.0-3 %{?python_provide:%python_provide python2-%{pypi_name}} BuildRequires: python2-six BuildRequires: python2-devel # tests BuildRequires: python2-testtools BuildRequires: python2-nose Requires: python2-six %description -n python2-%{pypi_name} A python package that provides useful locks. %if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: A python package that provides useful locks %{?python_provide:%python_provide python3-%{pypi_name}} BuildRequires: python3-six BuildRequires: python3-devel # tests BuildRequires: python3-testtools BuildRequires: python3-nose Requires: python3-six %description -n python3-%{pypi_name} A python package that provides useful locks. %endif %prep %setup -qc mv %{pypi_name}-%{version} python2 pushd python2 # copy LICENSE etc. to top level dir cp -a LICENSE .. cp -a README.rst .. popd %if 0%{?with_python3} cp -a python2 python3 %endif %build pushd python2 %{__python2} setup.py build popd %if 0%{?with_python3} pushd python3 %{__python3} setup.py build popd %endif # with_python3 %install pushd python2 %{__python2} setup.py install --skip-build --root %{buildroot} popd %if 0%{?with_python3} pushd python3 %{__python3} setup.py install --skip-build --root %{buildroot} popd %endif # with_python3 %check nosetests-%{python2_version} %if 0%{?with_python3} nosetests-%{python3_version} %endif # with_python3 %files -n python2-%{pypi_name} %doc README.rst %license LICENSE %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/%{pypi_name}-%{version}-py%{python_version}.egg-info %if 0%{?with_python3} %files -n python3-%{pypi_name} %doc README.rst %license LICENSE %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %endif # with_python3 %changelog * Thu Feb 04 2016 Fedora Release Engineering - 0.14.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Nov 18 2015 Matthias Runge - 0.14.1-2 - update to 0.14.1 (rhbz#1281772) - fix python_provide * Mon Nov 16 2015 Matthias Runge - 0.13.0-3 - Fix build * Tue Nov 10 2015 Fedora Release Engineering - 0.13.0-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Fri Aug 28 2015 Matthias Runge - 0.13.0-1 - update to 0.13.0 (rhbz#1256153) * Mon Jun 22 2015 Matthias Runge - 0.12.0-1 - update to 0.12.0 (rhbz#1234253) * Thu Jun 18 2015 Fedora Release Engineering - 0.9.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Fri Jun 12 2015 Matthias Runge - 0.9.0-2 - switch to github sourcecode, license included - add tests, fix conditionals for python3 * Thu Jun 11 2015 Matthias Runge - 0.9.0-1 - Initial package. (rhbz#1230548)