Blob Blame History Raw
%global upstream_name aiohttp-negotiate
%global modname aiohttp_negotiate

Name:           python-%{upstream_name}
Version:        0.11
Release:        1%{?dist}
Summary:        Add-on for Python aiohttp library to support Negotiate authentication
License:        BSD
URL:            https://github.com/ox-it/aiohttp-negotiate
Source0:        https://github.com/ox-it/%{upstream_name}/archive/%{version}.tar.gz#/%{upstream_name}-%{version}.tar.gz
# https://github.com/ox-it/aiohttp-negotiate/pull/1
Source1:        https://raw.githubusercontent.com/danc86/aiohttp-negotiate/350ac51ba0ab0b871d39c975af27d027e35f514e/LICENSE
BuildArch:      noarch

%global _description \
A mixin for supporting Negotiate authentication with aiohttp.

%description %{_description}

%package -n python%{python3_pkgversion}-%{upstream_name}
Summary:        %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{upstream_name}}
BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-setuptools
Requires:       python%{python3_pkgversion}-aiohttp
Requires:       python%{python3_pkgversion}-www-authenticate
Requires:       python%{python3_pkgversion}-gssapi

%description -n python%{python3_pkgversion}-%{upstream_name} %{_description}

Python %{python3_pkgversion} version.

%if 0%{?with_python3_other}
%package -n python%{python3_other_pkgversion}-%{upstream_name}
Summary:        %{summary}
%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{upstream_name}}
BuildRequires:  python%{python3_other_pkgversion}-devel
BuildRequires:  python%{python3_other_pkgversion}-setuptools
Requires:       python%{python3_other_pkgversion}-aiohttp
Requires:       python%{python3_other_pkgversion}-www-authenticate
Requires:       python%{python3_other_pkgversion}-gssapi

%description -n python%{python3_other_pkgversion}-%{upstream_name} %{_description}

Python %{python3_other_pkgversion} version.
%endif

%prep
%autosetup -n %{upstream_name}-%{version}
cp -p %{SOURCE1} .

%build
%py3_build
%if 0%{?with_python3_other}
%py3_other_build
%endif

%install
%py3_install
%if 0%{?with_python3_other}
%py3_other_install
%endif

%check
# No tests. :-(

%files -n python%{python3_pkgversion}-%{upstream_name}
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{modname}.py*
%{python3_sitelib}/__pycache__/%{modname}.*
%{python3_sitelib}/%{modname}-*.egg-info

%if 0%{?with_python3_other}
%files -n python%{python3_other_pkgversion}-%{upstream_name}
%license LICENSE
%doc README.rst
%{python3_other_sitelib}/%{modname}.py*
%{python3_other_sitelib}/__pycache__/%{modname}.*
%{python3_other_sitelib}/%{modname}-*.egg-info
%endif

%changelog
* Thu Dec 08 2016 Dan Callaghan <dcallagh@redhat.com> - 0.11-1
- initial version