d6e60b7
%global pypi_name Flask-HTTPAuth
d6e60b7
%global pkg_name flask-httpauth
d6e60b7
626c950
%if 0%{?fedora} || 0%{?rhel} > 7
626c950
%bcond_with    python2
626c950
%bcond_without python3
626c950
%else
626c950
%bcond_without python2
626c950
%bcond_with    python3
d6e60b7
%endif
d6e60b7
d6e60b7
Name:           python-%{pkg_name}
d6e60b7
Version:        3.2.3
4d2dcc6
Release:        22%{?dist}
d6e60b7
Summary:        Basic and Digest HTTP authentication for Flask routes
d6e60b7
d6e60b7
License:        MIT
d6e60b7
URL:            http://github.com/miguelgrinberg/flask-httpauth/
d6e60b7
Source0:        https://files.pythonhosted.org/packages/source/F/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
d6e60b7
BuildArch:      noarch
d6e60b7
d6e60b7
%description
d6e60b7
FlaskHTTPAuth Basic and Digest HTTP authentication for Flask routes.
d6e60b7
626c950
%if %{with python2}
d6e60b7
%package -n     python2-%{pkg_name}
d6e60b7
Summary:        Basic and Digest HTTP authentication for Flask routes
919971a
%{?python_provide:%python_provide python2-%{pkg_name}}
d6e60b7
BuildRequires:  python2-devel
49fa987
BuildRequires:  python2-flask
49fa987
BuildRequires:  python2-setuptools
49fa987
BuildRequires:  python2-sphinx
49fa987
Requires:       python2-flask
49fa987
Requires:       python2-werkzeug
d6e60b7
d6e60b7
%description -n python2-%{pkg_name}
d6e60b7
FlaskHTTPAuth Basic and Digest HTTP authentication for Flask routes.
626c950
%endif
d6e60b7
d6e60b7
%package -n     python-%{pkg_name}-doc
d6e60b7
Summary:        Documentation for Flask-HTTPAuth
d6e60b7
d6e60b7
%description -n python-%{pkg_name}-doc
d6e60b7
FlaskHTTPAuth Basic and Digest HTTP authentication for Flask routes.
d6e60b7
d6e60b7
This package provides the documentation.
d6e60b7
d6e60b7
626c950
%if %{with python3}
d6e60b7
%package -n     python3-%{pkg_name}
d6e60b7
Summary:        Basic and Digest HTTP authentication for Flask routes
919971a
%{?python_provide:%python_provide python3-%{pkg_name}}
d6e60b7
BuildRequires:  python3-devel
d6e60b7
BuildRequires:  python3-flask
d6e60b7
BuildRequires:  python3-setuptools
d6e60b7
BuildRequires:  python3-sphinx
d6e60b7
Requires:       python3-flask
d6e60b7
Requires:       python3-werkzeug
d6e60b7
d6e60b7
%description -n python3-%{pkg_name}
d6e60b7
FlaskHTTPAuth Basic and Digest HTTP authentication for Flask routes.
d6e60b7
%endif # with_python3
d6e60b7
d6e60b7
%prep
d6e60b7
%autosetup -n %{pypi_name}-%{version}
d6e60b7
# Remove bundled egg-info
d6e60b7
rm -rf %{pypi_name}.egg-info
d6e60b7
d6e60b7
%build
626c950
%if %{with python2}
d6e60b7
%py2_build
d6e60b7
# generate html docs
d6e60b7
%{__python2} setup.py build_sphinx
626c950
%endif
626c950
%if %{with python3}
626c950
%py3_build
626c950
# generate html docs
626c950
%{__python3} setup.py build_sphinx
626c950
%endif # with_python3
626c950
d6e60b7
# remove the sphinx-build leftovers
d6e60b7
rm -rf build/sphinx/html/.{doctrees,buildinfo}
d6e60b7
d6e60b7
d6e60b7
%install
626c950
%if %{with python3}
d6e60b7
%py3_install
d6e60b7
%endif # with_python3
626c950
%if %{with python2}
d6e60b7
%py2_install
626c950
%endif
d6e60b7
d6e60b7
%check
626c950
%if %{with python3}
d6e60b7
%{__python3} setup.py test
d6e60b7
%endif # with_python3
626c950
%if %{with python2}
d6e60b7
%{__python2} setup.py test
626c950
%endif
d6e60b7
626c950
%if %{with python2}
d6e60b7
%files -n python2-%{pkg_name}
d6e60b7
%license LICENSE
d6e60b7
%doc README.md
d6e60b7
%{python2_sitelib}/flask_httpauth.py*
d6e60b7
%{python2_sitelib}/Flask_HTTPAuth-%{version}-py?.?.egg-info
626c950
%endif
d6e60b7
d6e60b7
%files -n python-%{pkg_name}-doc
d6e60b7
%license LICENSE
d6e60b7
%doc build/sphinx/html
d6e60b7
626c950
%if %{with python3}
d6e60b7
%files -n python3-%{pkg_name}
d6e60b7
%license LICENSE
d6e60b7
%doc README.md
d6e60b7
%{python3_sitelib}/__pycache__/*
d6e60b7
%{python3_sitelib}/flask_httpauth.py
d1c1094
%{python3_sitelib}/Flask_HTTPAuth-%{version}-py%{python3_version}.egg-info
d6e60b7
%endif # with_python3
d6e60b7
d6e60b7
%changelog
4d2dcc6
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-22
4d2dcc6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
4d2dcc6
5b17bd2
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-21
5b17bd2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
5b17bd2
fe3b899
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 3.2.3-20
fe3b899
- Rebuilt for Python 3.11
fe3b899
fea8e6d
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-19
fea8e6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
fea8e6d
ae6d814
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-18
ae6d814
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
ae6d814
512e3f7
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 3.2.3-17
512e3f7
- Rebuilt for Python 3.10
512e3f7
aa7b793
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-16
aa7b793
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
aa7b793
c2c8c9b
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-15
c2c8c9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
c2c8c9b
671ccac
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 3.2.3-14
671ccac
- Rebuilt for Python 3.9
671ccac
b5c117e
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-13
b5c117e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
b5c117e
a107947
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.2.3-12
a107947
- Rebuilt for Python 3.8.0rc1 (#1748018)
a107947
9bff042
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.2.3-11
9bff042
- Rebuilt for Python 3.8
9bff042
11ffa36
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-10
11ffa36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
11ffa36
626c950
* Mon Feb 04 2019 Javier Peña <jpena@redhat.com> - 3.2.3-9
626c950
- Remove Python2 subpackage in Fedora 30+ (bz#1671976)
626c950
6b2d4ba
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-8
6b2d4ba
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
6b2d4ba
9fc7952
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-7
9fc7952
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
9fc7952
3340a93
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.2.3-6
3340a93
- Rebuilt for Python 3.7
3340a93
f11eec6
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-5
f11eec6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f11eec6
49fa987
* Thu Jan 18 2018 Iryna Shcherbina <ishcherb@redhat.com> - 3.2.3-4
49fa987
- Update Python 2 dependency declarations to new packaging standards
49fa987
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
49fa987
919971a
* Fri Sep 15 2017 Javier Peña <jpena@redhat.com> - 3.2.3-3
919971a
- Fix provides for python2 and python3 subpackages
919971a
41e1121
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-2
41e1121
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
41e1121
d6e60b7
* Mon Jun 05 2017 Javier Peña <jpena@redhat.com> - 3.2.3-1
d6e60b7
- Updated to upstream version 3.2.3
d6e60b7
- Added %check, doc and test subpackages
d6e60b7
* Tue May 16 2017 Javier Peña <jpena@redhat.com> - 3.2.2-1
d6e60b7
- Initial package.