%global srcname pytest-datafiles %?python_enable_dependency_generator Name: python-%{srcname} Version: 2.0 Release: 1%{?dist} Summary: pytest plugin to create a tmpdir containing a preconfigured set of files and/or directories License: MIT URL: https://github.com/omarkohl/pytest-datafiles Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch %description This plugin allows you to specify one or several files/directories that are copied to a temporary directory (tmpdir) before the execution of the test. This means the original files are not modified and every test runs on its own version of the same files. %package -n python2-%{srcname} Summary: Pytest plugin for coverage reporting BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python2-pytest Requires: python2-pytest %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} This plugin allows you to specify one or several files/directories that are copied to a temporary directory (tmpdir) before the execution of the test. This means the original files are not modified and every test runs on its own version of the same files. %package -n python3-%{srcname} Summary: Pytest plugin for coverage reporting BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pytest Requires: python3-pytest %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} This plugin allows you to specify one or several files/directories that are copied to a temporary directory (tmpdir) before the execution of the test. This means the original files are not modified and every test runs on its own version of the same files. %prep %autosetup -n %{srcname}-%{version} %build %py2_build %py3_build %install %py2_install %py3_install %check PATH=%{buildroot}%{_bindir}:${PATH} \ PYTHONPATH=%{buildroot}%{python2_sitelib} \ %{__python2} setup.py test PATH=%{buildroot}%{_bindir}:${PATH} \ PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{__python3} setup.py test %files -n python2-%{srcname} %license LICENSE %doc README.rst CHANGELOG.rst %{python2_sitelib}/* %files -n python3-%{srcname} %license LICENSE %doc README.rst CHANGELOG.rst %{python3_sitelib}/* %changelog