Blob Blame History Raw
%global srcname pytest-virtualenv
%global sum Virtualenv fixture for py.test

Name:           python-%{srcname}
Version:        1.2.11
Release:        3%{?dist}
Summary:        %{sum}

License:        MIT
URL:            https://pypi.python.org/pypi/%{srcname}
Source0:        https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel python3-devel
BuildRequires:  python2-pytest python3-pytest
BuildRequires:  python2-six python3-six
BuildRequires:  python2-setuptools_git python3-setuptools_git
# needed for tests
BuildRequires:  python2-pytest-shutil python3-pytest-shutil
BuildRequires:  python2-pytest-fixture-config python3-pytest-fixture-config
BuildRequires:  python2-path python3-path
BuildRequires:  python2-execnet python3-execnet
BuildRequires:  python2-mock python3-mock
BuildRequires:  python2-contextlib2 python3-contextlib2
BuildRequires:  python2-virtualenv python3-virtualenv

%description
Create a Python virtual environment in your test that cleans up on teardown.
The fixture has utility methods to install packages and list what's installed.

%package -n python2-%{srcname}
Summary:        %{sum}
%{?python_provide:%python_provide python2-%{srcname}}
Requires:  python2-pytest python2-pytest-shutil python2-pytest-fixture-config python2-path python2-execnet python2-contextlib2 python2-virtualenv

%description -n python2-%{srcname}
Create a Python virtual environment in your test that cleans up on teardown.
The fixture has utility methods to install packages and list what's installed.

%package -n python3-%{srcname}
Summary:        %{sum}
%{?python_provide:%python_provide python3-%{srcname}}
Requires: python3-pytest python3-pytest-shutil python3-pytest-fixture-config python3-path python3-execnet python3-contextlib2 python3-virtualenv

%description -n python3-%{srcname}
Create a Python virtual environment in your test that cleans up on teardown.
The fixture has utility methods to install packages and list what's installed.

%prep
%autosetup -n %{srcname}-%{version}

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

%check
%{__python2} setup.py test
%{__python3} setup.py test

%files -n python2-%{srcname}
%doc README.md CHANGES.md
%{python2_sitelib}/*

%files -n python3-%{srcname}
%doc README.md CHANGES.md
%{python3_sitelib}/*

%changelog
* Mon Sep 18 2017 Kevin Fenzi <kevin@scrye.com> - 1.2.11-3
- Fix up Requires to pull in things it needs to function

* Sun Sep 10 2017 Kevin Fenzi <kevin@scrye.com> - 1.2.11-2
- Added BuildRequires for tests

* Tue Aug 15 2017 Kevin Fenzi <kevin@scrye.com> - 1.2.11-1
- Initial version.