diff --git a/0001-Revert-Flask-Common.patch b/0001-Revert-Flask-Common.patch new file mode 100644 index 0000000..9c67308 --- /dev/null +++ b/0001-Revert-Flask-Common.patch @@ -0,0 +1,49 @@ +From c63842257e8b850be9ef7c0f7c96a0f169d5bba3 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Wed, 30 Aug 2017 11:33:21 -0400 +Subject: [PATCH] Revert "Flask-Common" + +This reverts commit a39de83be1b7330f6a99981bf54152c525847299. It +pulled in flask-common without actually using it for anything. +--- + httpbin/core.py | 4 ---- + setup.py | 2 +- + 2 files changed, 1 insertion(+), 5 deletions(-) + +diff --git a/httpbin/core.py b/httpbin/core.py +index 73adcb6..39516c6 100644 +--- a/httpbin/core.py ++++ b/httpbin/core.py +@@ -16,7 +16,6 @@ import uuid + import argparse + + from flask import Flask, Response, request, render_template, redirect, jsonify as flask_jsonify, make_response, url_for +-from flask_common import Common + from six.moves import range as xrange + from werkzeug.datastructures import WWWAuthenticate, MultiDict + from werkzeug.http import http_date +@@ -57,9 +56,6 @@ tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates') + app = Flask(__name__, template_folder=tmpl_dir) + app.debug = bool(os.environ.get('DEBUG')) + +-# Setup Flask-Common. +-common = Common(app) +- + # Send app errors to Sentry. + if 'SENTRY_DSN' in os.environ: + sentry = Sentry(app, dsn=os.environ['SENTRY_DSN']) +diff --git a/setup.py b/setup.py +index 229d434..7c395c1 100644 +--- a/setup.py ++++ b/setup.py +@@ -34,6 +34,6 @@ setup( + include_package_data = True, # include files listed in MANIFEST.in + install_requires=[ + 'Flask', 'MarkupSafe', 'decorator', 'itsdangerous', 'six', 'brotlipy', +- 'raven[flask]', 'flask_limiter', 'Flask-Common' ++ 'raven[flask]', 'flask_limiter' + ], + ) +-- +2.13.5 + diff --git a/python-httpbin.spec b/python-httpbin.spec index 10247d9..b1b34bd 100644 --- a/python-httpbin.spec +++ b/python-httpbin.spec @@ -1,5 +1,7 @@ -# Not building on EPEL for now due to an issue with older Werkzeug: -# https://github.com/Runscope/httpbin/pull/318 +# Not building on EPEL 6 due to incompatibility with Werkzeug < 0.9: +# https://github.com/Runscope/httpbin/issue/317 + +# Not currently building on EPEL 7 as brotli is not built for it %global modname httpbin @@ -10,7 +12,7 @@ being considered. All endpoint responses are JSON-encoded. # Enable Python 3 builds for Fedora + EPEL >7 # EPEL 7 is missing Python 3 builds of flask and itsdangerous -%if 0%{?rhel} && 0%{?rhel} <= 7 +%if 0%{?rhel} && 0%{?rhel} < 8 %bcond_with python3 %else %bcond_without python3 @@ -18,39 +20,33 @@ being considered. All endpoint responses are JSON-encoded. # Requirements for tests (BuildRequires) and run (Requires) # EPEL builds do not provide python2-* -%global t_requires python-flask python-markupsafe python-decorator python-itsdangerous python-six -%global t3_requires python%{python3_pkgversion}-flask python%{python3_pkgversion}-markupsafe python%{python3_pkgversion}-decorator python%{python3_pkgversion}-itsdangerous python%{python3_pkgversion}-six +%global t_requires python-brotli python-flask python-markupsafe python-decorator python-itsdangerous python-raven python-six +%global t3_requires python3-brotli python%{python3_pkgversion}-flask python%{python3_pkgversion}-markupsafe python%{python3_pkgversion}-decorator python%{python3_pkgversion}-itsdangerous python3-raven python%{python3_pkgversion}-six Name: python-%{modname} -Version: 0.5.0 -Release: 7%{?dist} +Version: 0.6.1 +Release: 1%{?dist} Summary: HTTP Request & Response Service, written in Python + Flask License: MIT URL: https://github.com/Runscope/httpbin Source0: %{url}/archive/v%{version}/%{modname}-%{version}.tar.gz +# Upstream made httpbin pull in flask-common (which we don't have +# packaged) but not actually use it for anything +# https://github.com/kennethreitz/httpbin/issues/381 +Patch0: 0001-Revert-Flask-Common.patch BuildArch: noarch + %description %{desc} %package -n python2-%{modname} Summary: %{summary} BuildRequires: python2-devel -# no python2-setuptools on EL6 -%if 0%{?rhel} && 0%{?rhel} <= 7 -BuildRequires: python-setuptools -%else BuildRequires: python2-setuptools -%endif BuildRequires: %{t_requires} Requires: %{t_requires} -# Required on EL 6 but no longer provided on F>25, hence this annoying -# conditional -%if 0%{?rhel} && 0%{?rhel} < 7 -BuildRequires: python-argparse -Requires: python-argparse -%endif # rhel < 7 %{?python_provide:%python_provide python2-%{modname}} %description -n python2-%{modname} @@ -130,24 +126,29 @@ LANG=en_US.UTF-8 %py3_other_install %files -n python2-%{modname} %{python2_sitelib}/%{modname}* %license LICENSE -%doc README.rst AUTHORS +%doc README.md AUTHORS %if %{with python3} %files -n python%{python3_pkgversion}-%{modname} %{python3_sitelib}/%{modname}* %license LICENSE -%doc README.rst AUTHORS +%doc README.md AUTHORS %if 0%{?with_python3_other} %files -n python%{python3_other_pkgversion}-%{modname} %{python3_other_sitelib}/%{modname}* %license LICENSE -%doc README.rst AUTHORS +%doc README.md AUTHORS %endif %endif ################################################################################# %changelog +* Wed Aug 30 2017 Adam Williamson - 0.6.1-1 +- Update to 0.6.1 +- Remove EL 6 compatibility bits (probably won't ever build on EL 6) +- Remove apparently useless upstream requirement for flask-common + * Thu Jul 27 2017 Fedora Release Engineering - 0.5.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild