88e569d
%global srcname mimerender
88e569d
88e569d
Name:           python-%{srcname}
765bae9
Version:        0.6.0
07c9d1f
Release:        13%{?dist}
88e569d
Summary:        RESTful HTTP Content Negotiation for Flask, Bottle, etc.
88e569d
88e569d
License:        MIT
765bae9
URL:            https://pypi.python.org/pypi/%{srcname}
765bae9
Source0:        https://pypi.python.org/packages/source/m/%{srcname}/%{srcname}-%{version}.tar.gz
765bae9
# License file is now in the *repo* but not the *tarball*...
765bae9
Source1:        https://github.com/martinblech/mimerender/blob/v%{version}/LICENSE
88e569d
88e569d
BuildArch:      noarch
88e569d
BuildRequires:  python3-devel
88e569d
BuildRequires:  python3-mimeparse
88e569d
BuildRequires:  python3-setuptools
88e569d
88e569d
%description
88e569d
mimerender provides a decorator that wraps a HTTP request handler to select
88e569d
the correct render function for a given HTTP Accept header. It uses mimeparse
88e569d
to parse the accept string and select the best available representation.
88e569d
Supports Flask, Bottle, web.py and webapp2 out of the box, and it’s easy to
88e569d
add support for other frameworks.
88e569d
88e569d
88e569d
%package -n python3-%{srcname}
88e569d
Summary:        %{summary}
88e569d
%{?python_provide:%python_provide python3-%{srcname}}
88e569d
Requires:       python3-mimeparse
d551047
# Note: mimerender has subclasses of MimeRenderBase for web.py, Flask,
d551047
# Bottle, and webapp2. When you import 'mimerender', the subclass for
d551047
# each framework you have installed will be defined; if the framework
d551047
# isn't installed, the subclass for it is skipped (they're all in try/
d551047
# except blocks). So if you have python3-flask installed you'll get
d551047
# the FlaskMimeRender class, if you have python3-bottle installed you'll
d551047
# get BottleMimeRender, and so on. This relationship is not expressed
d551047
# through dependencies as it doesn't seem to the packager that such
d551047
# dependencies would actually aid in any real-world use of mimeparse;
d551047
# if you want to use it in code you've probably already picked a web
d551047
# framework, and if it's just being pulled in as a dependency of some
d551047
# other package, *that* package will express the appropriate deps on
d551047
# the web framework.
d551047
#
d551047
# Also note that *executing* mimerender.py requires the unittest or
d551047
# unittest2 module. All this does is run the test suite (as used in
d551047
# check, below). There is no Requires: for this, because it's not
d551047
# the expected use of the package, in all normal cases it will be
d551047
# used by importing the module.
88e569d
88e569d
%description -n python3-%{srcname}
88e569d
mimerender provides a decorator that wraps a HTTP request handler to select
88e569d
the correct render function for a given HTTP Accept header. It uses mimeparse
88e569d
to parse the accept string and select the best available representation.
88e569d
Supports Flask, Bottle, web.py and webapp2 out of the box, and it’s easy to
88e569d
add support for other frameworks. This is the Python 3 build of mimerender.
88e569d
88e569d
88e569d
%prep
88e569d
%autosetup -n %{srcname}-%{version}
88e569d
cp %{SOURCE1} ./LICENSE
88e569d
88e569d
%build
88e569d
%py3_build
88e569d
88e569d
%install
88e569d
%py3_install
88e569d
88e569d
%check
765bae9
%{__python3} src/mimerender.py
88e569d
88e569d
%files -n python3-%{srcname}
88e569d
%license LICENSE
88e569d
%{python3_sitelib}/%{srcname}*
88e569d
%{python3_sitelib}/__pycache__/%{srcname}*
88e569d
88e569d
%changelog
07c9d1f
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-13
07c9d1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
07c9d1f
8f577c1
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-12
8f577c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
8f577c1
521da59
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.6.0-11
521da59
- Rebuilt for Python 3.10
521da59
5556ae8
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-10
5556ae8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
5556ae8
6641e8a
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-9
6641e8a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
6641e8a
cc26b19
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-8
cc26b19
- Rebuilt for Python 3.9
cc26b19
97368bd
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-7
97368bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
97368bd
45fa303
* Thu Jan  9 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.6.0-6
45fa303
- Remove dependency on unittest2 (#1789200)
45fa303
9794c79
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-5
9794c79
- Rebuilt for Python 3.8.0rc1 (#1748018)
9794c79
8ef989f
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-4
8ef989f
- Rebuilt for Python 3.8
8ef989f
ef49860
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-3
ef49860
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
ef49860
8261625
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-2
8261625
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
8261625
765bae9
* Wed Oct 10 2018 Adam Williamson <awilliam@redhat.com> - 0.6.0-1
765bae9
- New upstream release 0.6.0
765bae9
- Drop workarounds for things fixed upstream
765bae9
6abce55
* Wed Oct 10 2018 Miro Hrončok <mhroncok@redhat.com> - 0.5.5-11
6abce55
- Python2 binary package has been removed
6abce55
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
6abce55
2cddda2
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.5-10
2cddda2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
2cddda2
6aaa089
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.5.5-9
6aaa089
- Rebuilt for Python 3.7
6aaa089
97f0254
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.5-8
97f0254
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
97f0254
64e3e47
* Thu Jan 25 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.5.5-7
64e3e47
- Update Python 2 dependency declarations to new packaging standards
64e3e47
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
64e3e47
75ef03e
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.5-6
75ef03e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
75ef03e
d55229a
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.5-5
d55229a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d55229a
e628903
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.5.5-4
e628903
- Rebuild for Python 3.6
e628903
55fe51e
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.5-3
55fe51e
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
55fe51e
adbed62
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.5-2
adbed62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
adbed62
88e569d
* Wed Jan 20 2016 Adam Williamson <awilliam@redhat.com> - 0.5.5-1
88e569d
- initial package (based on skeleton from Python guidelines)