%global pypiname pluggy %{!?__python2:%global __python2 %{__python}} %{!?python2_sitelib: %global python2_sitelib %{python_sitelib}} %{!?python2_sitearch: %global python2_sitearch %{python_sitearch}} %{!?python2_version: %global python2_version %{python_version}} %if 0%{?fedora} %global with_python3 1 %else %global with_python3 0 %endif Name: python-pluggy Version: 0.3.0 Release: 2%{?dist} Summary: The plugin manager stripped of pytest specific details License: MIT URL: https://github.com/hpk42/pluggy Source0: http://pypi.python.org/packages/source/t/%{pypiname}/%{pypiname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: pytest BuildRequires: python-setuptools %if %{with python3} BuildRequires: python3-devel BuildRequires: python3-pytest BuildRequires: python3-setuptools %endif # with python3 %description The plugin manager stripped of pytest specific details. %if 0%{?with_python3} %package -n python3-%{pypiname} Summary: The plugin manager stripped of pytest specific details. %description -n python3-%{pypiname} The plugin manager stripped of pytest specific details. %endif # with python3 %prep %setup -qc mv %{pypiname}-%{version} python2 pushd python2 cp -a LICENSE .. cp -a README.rst .. rm -rf {pypiname}.egg-info popd %if 0%{?with_python3} cp -a python2 python3 %endif # with python3 %build pushd python2 %{__python2} setup.py build popd %if 0%{?with_python3} pushd python3 %{__python3} setup.py build popd %endif # with python3 %install %if 0%{?with_python3} pushd python3 %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT popd %endif # with python3 pushd python2 %{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT popd %check pushd python2 py.test test_pluggy.py popd %if 0%{?with_python3} pushd python3 py.test-3.4 test_pluggy.py popd %endif %files %{python_sitelib}/%{pypiname}.py %{python_sitelib}/%{pypiname}.pyc %{python_sitelib}/%{pypiname}.pyo %{python_sitelib}/%{pypiname}-%{version}-py2.?.egg-info %if 0%{?with_python3} %{python3_sitelib}/%{pypiname}.py %{python3_sitelib}/__pycache__/%{pypiname}.cpython-34.pyc %{python3_sitelib}/__pycache__/%{pypiname}.cpython-34.pyo %{python3_sitelib}/%{pypiname}-%{version}-py3.4.egg-info/PKG-INFO %{python3_sitelib}/%{pypiname}-%{version}-py3.4.egg-info/SOURCES.txt %{python3_sitelib}/%{pypiname}-%{version}-py3.4.egg-info/dependency_links.txt %{python3_sitelib}/%{pypiname}-%{version}-py3.4.egg-info/top_level.txt %endif # with python3 %doc README.rst %license LICENSE %changelog * Fri Aug 21 2015 Matthias Runge - 0.3.0-2 - add python2_sitelib macros and BR to setuptools (rhbz#1254484) * Fri Aug 14 2015 Matthias Runge - 0.3.0-1 - version based on the inital proposal of Adam Young