%global srcname pytest-env %global commit afb13a0e908f649b69273f299262ac12f1b71113 %{?commit:%global shortcommit %(c=%{commit}; echo ${c:0:7})} %?python_enable_dependency_generator Name: python-%{srcname} Version: 0.6.2 Release: 1%{?dist} Summary: pytest plugin used to set environment variables License: MIT URL: https://github.com/MobileDynasty/%{srcname} Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz Source11: %{url}/raw/%{commit}/README.md Source12: %{url}/raw/%{commit}/LICENSE BuildArch: noarch %description This is a py.test plugin that enables you to set environment variables in the pytest.ini file. %package -n python2-%{srcname} Summary: Pytest plugin for coverage reporting BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: %{py2_dist pytest} %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} This is a py.test plugin that enables you to set environment variables in the pytest.ini file. %package -n python3-%{srcname} Summary: Pytest plugin for coverage reporting BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: %{py3_dist pytest} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} This is a py.test plugin that enables you to set environment variables in the pytest.ini file. %prep %autosetup -n %{srcname}-%{version} cp %{SOURCE11} %{SOURCE12} ./ %build %py2_build %py3_build %install %py3_install %py2_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.md %{python2_sitelib}/pytest_env %{python2_sitelib}/pytest_env-%{version}*.egg-info %files -n python3-%{srcname} %license LICENSE %doc README.md %{python3_sitelib}/pytest_env %{python3_sitelib}/pytest_env-%{version}*.egg-info %changelog