0ef27c1
%global pypi_name pytest-forked
0ef27c1
%global desc The pytest-forked plugin extends py.test by adding an option to run tests in\
0ef27c1
isolated forked subprocesses. This is useful if you have tests involving C or\
0ef27c1
C++ libraries that might crash the process. To use the plugin, simply use the\
0ef27c1
--forked argument when invoking py.test.
0ef27c1
0ef27c1
Name:           python-%{pypi_name}
0ef27c1
Version:        0.2
0ef27c1
Release:        2%{?dist}
0ef27c1
Summary:        py.test plugin for running tests in isolated forked subprocesses
0ef27c1
0ef27c1
License:        MIT
0ef27c1
URL:            https://github.com/pytest-dev/pytest-forked
0ef27c1
Source0:        https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
0ef27c1
BuildArch:      noarch
0ef27c1
0ef27c1
BuildRequires:  python2-devel python3-devel
bc4f03f
BuildRequires:  python2-py python2-pytest python2-setuptools_scm
bc4f03f
BuildRequires:  python3-py python3-pytest python3-setuptools_scm
0ef27c1
0ef27c1
%description
0ef27c1
%{desc}
0ef27c1
0ef27c1
%package -n     python2-%{pypi_name}
0ef27c1
Summary:        %{summary}
0ef27c1
%{?python_provide:%python_provide python2-%{pypi_name}}
0ef27c1
bc4f03f
Requires:       python2-py python2-pytest
0ef27c1
%description -n python2-%{pypi_name}
0ef27c1
%{desc}
0ef27c1
0ef27c1
%package -n     python3-%{pypi_name}
0ef27c1
Summary:        %{summary}
0ef27c1
%{?python_provide:%python_provide python3-%{pypi_name}}
0ef27c1
bc4f03f
Requires:       python3-py python3-pytest
0ef27c1
%description -n python3-%{pypi_name}
0ef27c1
%{desc}
0ef27c1
0ef27c1
%prep
0ef27c1
%autosetup -n %{pypi_name}-%{version}
0ef27c1
rm -f testing/conftest.pyc
0ef27c1
rm -rf testing/__pycache__
0ef27c1
0ef27c1
%build
0ef27c1
%py2_build
0ef27c1
%py3_build
0ef27c1
0ef27c1
%install
0ef27c1
%py2_install
0ef27c1
%py3_install
0ef27c1
0ef27c1
%check
0ef27c1
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} testing
0ef27c1
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} testing
0ef27c1
0ef27c1
0ef27c1
%files -n python2-%{pypi_name}
0ef27c1
%doc example/boxed.txt README.rst
0ef27c1
%license LICENSE
0ef27c1
%{python2_sitelib}/pytest_forked*
0ef27c1
0ef27c1
%files -n python3-%{pypi_name}
0ef27c1
%doc example/boxed.txt README.rst
0ef27c1
%license LICENSE
0ef27c1
%{python3_sitelib}/pytest_forked*
0ef27c1
0ef27c1
%changelog
0ef27c1
* Thu Aug 17 2017 Scott Talbert <swt@techie.net> - 0.2-2
0ef27c1
- Updated to use py[23]dist macros for BR and R
0ef27c1
0ef27c1
* Thu Aug 10 2017 Scott Talbert <swt@techie.net> - 0.2-1
0ef27c1
- Initial package.