Blob Blame History Raw
# Created by pyp2rpm-3.0.0
%global pypi_name virtualenv-api
%global underscore_name virtualenv_api

Name:           python-%{pypi_name}
Version:        2.1.8
Release:        1%{?dist}
Summary:        An API for virtualenv/pip

License:        BSD
URL:            https://github.com/sjkingo/virtualenv-api
Source0:        %{pypi_name}-%{version}.tar.gz

# upstream PR https://github.com/sjkingo/virtualenv-api/pull/25
Patch0:         test_suite_fix.patch

BuildArch:      noarch
 
BuildRequires:  python-setuptools
BuildRequires:  python2-devel
BuildRequires:  python2-virtualenv
BuildRequires:  git-all
 
BuildRequires:  python3-setuptools
BuildRequires:  python3-devel
BuildRequires:  python3-virtualenv

%description
virtualenv-api - an API for virtualenv
Tool to create isolated Python environments. Unfortunately, 
it does not expose a native Python API. This package aims to 
provide an API in the form of a wrapper around virtualenv.

%package -n     python2-%{pypi_name}
Summary:        An API for virtualenv/pip
%{?python_provide:%python_provide python2-%{pypi_name}}
 
Requires:       python-six
%description -n python2-%{pypi_name}
virtualenv-api - an API for virtualenv
Tool to create isolated Python environments. Unfortunately, 
it does not expose a native Python API. This package aims to 
provide an API in the form of a wrapper around virtualenv.

%package -n     python3-%{pypi_name}
Summary:        An API for virtualenv/pip
%{?python_provide:%python_provide python3-%{pypi_name}}
 
Requires:       python3-six
%description -n python3-%{pypi_name}
virtualenv-api - an API for virtualenv
Tool to create isolated Python environments. Unfortunately, 
it does not expose a native Python API. This package aims to 
provide an API in the form of a wrapper around virtualenv.

%prep
%autosetup -p1 -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%py2_build
%py3_build

%install
%py3_install
%py2_install

%check
%{__python3} setup.py test

%files -n python2-%{pypi_name} 
%license LICENSE
%doc README.rst
%{python2_sitelib}/virtualenvapi
%{python2_sitelib}/%{underscore_name}-%{version}-py?.?.egg-info

%files -n python3-%{pypi_name} 
%license LICENSE
%doc README.rst
%{python3_sitelib}/virtualenvapi
%{python3_sitelib}/%{underscore_name}-%{version}-py?.?.egg-info

%changelog
* Wed Mar 30 2016 Michal Cyprian <mcyprian@redhat.com> - 2.1.8-1
- Initial package.