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