%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} || 0%{?rhel} > 7 %global with_python3 1 %else %global with_python3 0 %endif Name: python-pluggy Version: 0.3.1 Release: 10%{?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/p/%{pypiname}/%{pypiname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: pytest BuildRequires: python-setuptools %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-pytest BuildRequires: python3-setuptools %endif # with python3 %global _description\ The plugin manager stripped of pytest specific details. %description %_description %package -n python2-%{pypiname} Summary: %summary %{?python_provide:%python_provide python2-%{pypiname}} %description -n python2-%{pypiname} %_description %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 %{buildroot} popd %endif # with python3 pushd python2 %{__python2} setup.py install -O1 --skip-build --root %{buildroot} popd %check pushd python2 export PYTHONPATH=.:$PYTHONPATH py.test testing/test_pluggy.py popd %if 0%{?with_python3} pushd python3 py.test-%{python3_version} testing/test_pluggy.py popd %endif %files -n python2-%{pypiname} %doc README.rst %license LICENSE %{python2_sitelib}/%{pypiname}.py %{python2_sitelib}/%{pypiname}.pyc %{python2_sitelib}/%{pypiname}.pyo %{python2_sitelib}/%{pypiname}-%{version}-py%{python2_version}.egg-info %if 0%{?with_python3} %files -n python3-%{pypiname} %{python3_sitelib}/%{pypiname}.py %{python3_sitelib}/__pycache__/%{pypiname}.cpython-%{python3_version_nodots}*.pyc %{python3_sitelib}/%{pypiname}-%{version}-py%{python3_version}.egg-info %doc README.rst %license LICENSE %endif # with python3 %changelog * Tue Jan 23 2018 Karsten Hopp - 0.3.1-10 - fix conditional * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.3.1-9 - Python 2 binary package renamed to python2-pluggy See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 * Thu Jul 27 2017 Fedora Release Engineering - 0.3.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.3.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 0.3.1-6 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 0.3.1-5 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 0.3.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Mon Nov 16 2015 Matthias Runge - 0.3.1-3 - make tests pass again on Python 3.5 * Tue Nov 10 2015 Fedora Release Engineering - 0.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Mon Sep 21 2015 Matthias Runge - 0.3.1-1 - update to 0.3.1 * Tue Aug 25 2015 Matthias Runge - 0.3.0-3 - fix python3 builds * 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