%global modname attr
Name:           python-%{modname}
Version:        0.3.1
Release:        1%{?dist}
Summary:        MultiDict implementation
License:        MIT
URL:            https://github.com/denis-ryzhkov/attr
Source0:        https://files.pythonhosted.org/packages/de/be/ddc7f84d4e087144472a38a373d3e319f51a6faf6e5fc1ae897173675f21/attr-0.3.1.tar.gz
BuildRequires:  gcc
BuildRequires: 	python-devel
BuildRequires:  python3-devel


%global _description \
Multidicts are useful for working with HTTP headers, URL query args etc.
%description %{_description}


%package -n python2-%{modname}
Summary:        %{summary}
BuildRequires:  python-devel
BuildRequires:  python-setuptools
BuildRequires:  Cython
%{?python_provide:%python_provide python-%{modname}}
%description -n python2-%{modname} %{_description}


%package -n python3-%{modname}
Summary:        %{summary}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-Cython
%{?python_provide:%python_provide python3-%{modname}}
%description -n python3-%{modname} %{_description}


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


%build
%{__python3} setup.py build

%{__python} setup.py build



%install
%{__python3} setup.py install --optimize 2 --root %{buildroot}
%{__python} setup.py install --optimize 2 --root %{buildroot}


%files -n python2-%{modname}
%{python_sitelib}/%{modname}-*.egg-info/
%{python_sitelib}/%{modname}.*
%{python_sitelib}/dry_%{modname}.*


%files -n python3-%{modname}
%{python3_sitelib}/%{modname}-*.egg-info/
%{python3_sitelib}/%{modname}.*
%{python3_sitelib}/dry_%{modname}.*
%{python3_sitelib}/__pycache__/%{modname}.*
%{python3_sitelib}/__pycache__/dry_%{modname}.*


%changelog
