From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E1438139085 for ; Mon, 16 Jan 2017 23:46:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 135D8234045; Mon, 16 Jan 2017 23:46:48 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D5467234045 for ; Mon, 16 Jan 2017 23:46:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A8D79341134 for ; Mon, 16 Jan 2017 23:46:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2176F24EA for ; Mon, 16 Jan 2017 23:46:45 +0000 (UTC) From: "Sebastian Pipping" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sebastian Pipping" Message-ID: <1484610334.1579a89f5f0fbd3f5312e1a1973d87f91a94e05c.sping@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/linkchecker/, net-analyzer/linkchecker/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/linkchecker/files/linkchecker-9.3-requests-check.patch net-analyzer/linkchecker/linkchecker-9.3-r2.ebuild X-VCS-Directories: net-analyzer/linkchecker/files/ net-analyzer/linkchecker/ X-VCS-Committer: sping X-VCS-Committer-Name: Sebastian Pipping X-VCS-Revision: 1579a89f5f0fbd3f5312e1a1973d87f91a94e05c X-VCS-Branch: master Date: Mon, 16 Jan 2017 23:46:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d6f2325b-d281-4b19-be56-50587155861d X-Archives-Hash: 1a1339d650f254395d1d6de390aa95ad commit: 1579a89f5f0fbd3f5312e1a1973d87f91a94e05c Author: Sebastian Pipping gentoo org> AuthorDate: Mon Jan 16 23:44:03 2017 +0000 Commit: Sebastian Pipping gentoo org> CommitDate: Mon Jan 16 23:45:34 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1579a89f net-analyzer/linkchecker: Fix requests check (bug #598064) Patch is a backport of this upstream patch: https://github.com/wummel/linkchecker/commit/c2ce810c3fb00b895a841a7be6b2e78c64e7b042 Package-Manager: Portage-2.3.3, Repoman-2.3.1 .../files/linkchecker-9.3-requests-check.patch | 34 +++++++++ net-analyzer/linkchecker/linkchecker-9.3-r2.ebuild | 83 ++++++++++++++++++++++ 2 files changed, 117 insertions(+) diff --git a/net-analyzer/linkchecker/files/linkchecker-9.3-requests-check.patch b/net-analyzer/linkchecker/files/linkchecker-9.3-requests-check.patch new file mode 100644 index 00000000..905b7f7 --- /dev/null +++ b/net-analyzer/linkchecker/files/linkchecker-9.3-requests-check.patch @@ -0,0 +1,34 @@ +From c2ce810c3fb00b895a841a7be6b2e78c64e7b042 Mon Sep 17 00:00:00 2001 +From: Bastian Kleineidam +Date: Tue, 28 Jun 2016 21:55:10 +0200 +Subject: [PATCH] Fix python requests version check + +--- + linkcheck/__init__.py | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/linkcheck/__init__.py b/linkcheck/__init__.py +index 22a0cf5..1cec214 100644 +--- a/linkcheck/__init__.py ++++ b/linkcheck/__init__.py +@@ -24,10 +24,17 @@ + # 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) ++# require a reasonably recent requests module: 2.4.0 from 2014-08-29 + import requests +-if requests.__version__ <= '2.2.0': +- raise SystemExit("This program requires Python requests 2.2.0 or later.") ++# PEP 396 has only version strings, bummer! PEP 386 is also not helpful. ++requests_version = requests.__version__.split('.') ++# Depends on the version scheme of Python requests ++if int(requests_version[0]) < 2 or \ ++ (int(requests_version[0]) == 2 and int(requests_version[1]) < 4): ++ raise SystemExit("This program requires Python requests 2.4.0 or later instead of %s." % requests.__version__) + + import os + # add the custom linkcheck_dns directory to sys.path diff --git a/net-analyzer/linkchecker/linkchecker-9.3-r2.ebuild b/net-analyzer/linkchecker/linkchecker-9.3-r2.ebuild new file mode 100644 index 00000000..c602251 --- /dev/null +++ b/net-analyzer/linkchecker/linkchecker-9.3-r2.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="sqlite?" + +inherit bash-completion-r1 distutils-r1 eutils multilib + +MY_PN="${PN/linkchecker/LinkChecker}" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Check websites for broken links" +HOMEPAGE="https://wummel.github.com/linkchecker/ https://pypi.python.org/pypi/linkchecker/" +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~ppc-macos ~x64-solaris" +IUSE="gnome sqlite X" + +RDEPEND=" + virtual/python-dnspython[${PYTHON_USEDEP}] + >=dev-python/requests-2.2.1[${PYTHON_USEDEP}] + gnome? ( dev-python/pygtk:2[${PYTHON_USEDEP}] ) + X? ( + dev-python/PyQt4[X,help,${PYTHON_USEDEP}] + dev-python/qscintilla-python[${PYTHON_USEDEP}] + )" +DEPEND=" + X? ( + dev-qt/qthelp:4 + dev-python/markdown2[${PYTHON_USEDEP}] + )" + +RESTRICT="test" + +S="${WORKDIR}/${MY_P}" + +python_prepare_all() { + local PATCHES=( + "${FILESDIR}"/${PN}-9.2-unbundle.patch + "${FILESDIR}"/${P}-bash-completion.patch + "${FILESDIR}"/${P}-desktop.patch + "${FILESDIR}"/${P}-requests-check.patch + ) + + emake -C doc/html + + distutils-r1_python_prepare_all +} + +python_install_all() { + DOCS=( + doc/upgrading.txt + doc/python3.txt + doc/changelog.txt + doc/development.txt + ) + distutils-r1_python_install_all + if ! use X; then + delete_gui() { + rm -rf \ + "${ED}"/usr/bin/linkchecker-gui* \ + "${ED}"/$(python_get_sitedir)/linkcheck/gui* || die + } + python_foreach_impl delete_gui + rm -f "${ED}"/usr/share/applications/linkchecker*.desktop || die + fi + + rm -f "${ED}"/usr/share/applications/linkchecker.desktop || die + + newicon doc/html/logo64x64.png ${PN}.png + + docinto html + dodoc doc/html/* + newbashcomp config/linkchecker-completion ${PN} + optfeature "bash-completion support" dev-python/argcomplete[${PYTHON_USEDEP}] + optfeature "Virus scanning" app-antivirus/clamav + optfeature "Geo IP support" dev-python/geoip-python[${PYTHON_USEDEP}] +}