diff --git a/fix-requests-version-bug.patch b/fix-requests-version-bug.patch new file mode 100644 index 0000000..651155d --- /dev/null +++ b/fix-requests-version-bug.patch @@ -0,0 +1,30 @@ +From 22dc3d0c49c9340866ce930b2f7861d2671cc965 Mon Sep 17 00:00:00 2001 +From: Charalampos Stratakis +Date: Tue, 19 Jul 2016 14:38:14 +0200 +Subject: [PATCH] Fix requests version bug + +--- + linkcheck/__init__.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/linkcheck/__init__.py b/linkcheck/__init__.py +index 5624855..231a7c4 100644 +--- a/linkcheck/__init__.py ++++ b/linkcheck/__init__.py +@@ -24,10 +24,10 @@ import sys + # Needs Python >= 2.7.2 which fixed http://bugs.python.org/issue11467 + if not (hasattr(sys, 'version_info') or + sys.version_info < (2, 7, 2, 'final', 0)): +- raise SystemExit("This program requires Python 2.7.2 or later.") ++ import platform ++ version = platform.python_version() ++ raise SystemExit("This program requires Python 2.7.2 or later instead of %s." % version) + import requests +-if requests.__version__ <= '2.2.0': +- raise SystemExit("This program requires Python requests 2.2.0 or later.") + + import os + # add the custom linkcheck_dns directory to sys.path +-- +2.7.4 + diff --git a/linkchecker.spec b/linkchecker.spec index e23130a..4347bfe 100644 --- a/linkchecker.spec +++ b/linkchecker.spec @@ -1,6 +1,6 @@ Name: linkchecker Version: 9.3 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Check HTML documents for broken links License: GPLv2 URL: http://wummel.github.io/linkchecker/ @@ -13,6 +13,10 @@ BuildRequires: python-setuptools BuildRequires: qt4-devel Requires: python-requests +# Should be fixed upstream in next release; see: +# https://github.com/wummel/linkchecker/commit/c2ce810c3fb00b895a841a7be6b2e78c64e7b042 +Patch0: fix-requests-version-bug.patch + %description LinkChecker is a website validator. LinkChecker checks links in web documents or full websites. @@ -45,6 +49,8 @@ This package contains a GUI program for %{name}. %prep %setup -qn LinkChecker-%{version} +%patch0 -p1 + %build make -C doc/html/ CFLAGS="%{optflags}" %{__python2} setup.py build @@ -81,6 +87,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/linkchecker-gui.deskt %{_datadir}/pixmaps/linkchecker.png %changelog +* Tue Jul 19 2016 Charalampos Stratakis - 9.3-6 +- Backport upstream patch to fix python-requests version error + * Tue Jul 19 2016 Fedora Release Engineering - 9.3-5 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages