Blob Blame History Raw
%global pypi_name visitor

Name:           python-%{pypi_name}
Version:        0.1.3
Release:        1%{?dist}
Summary:        A tiny python visitor implementation

License:        MIT
URL:            http://github.com/mbr/visitor
Source0:        https://files.pythonhosted.org/packages/source/v/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch
 
BuildRequires:  python-setuptools
BuildRequires:  python2-devel
 
BuildRequires:  python3-setuptools
BuildRequires:  python3-devel

%description
A tiny library to facilitate visitor. In fact, it is so small, you may just
be better off copy and pasting the source straight into your project...

%package -n     python2-%{pypi_name}
Summary:        A tiny pythonic visitor implementation
%{?python_provide:%python_provide python2-%{pypi_name}}

%description -n python2-%{pypi_name}
A tiny library to facilitate visitor. In fact, it is so small, you may just
be better off copy and pasting the source straight into your project...

%package -n     python3-%{pypi_name}
Summary:        A tiny pythonic visitor implementation
%{?python_provide:%python_provide python3-%{pypi_name}}

%description -n python3-%{pypi_name}
A tiny library to facilitate visitor. In fact, it is so small, you may just
be better off copy and pasting the source straight into your project...

%prep
%autosetup -n %{pypi_name}-%{version}
rm -rf %{pypi_name}.egg-info

%build
%py2_build
%py3_build

%install
%py3_install
%py2_install

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

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

%changelog
* Wed Oct 05 2016 david.hannequin@gmail.com - 0.1.3-1
- Initial package.