From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- dev-python/feedparser/Manifest | 6 ++ dev-python/feedparser/feedparser-5.2.1.ebuild | 43 ++++++++++++ .../files/feedparser-5.2.1-sgmllib.patch | 78 ++++++++++++++++++++++ dev-python/feedparser/metadata.xml | 14 ++++ 4 files changed, 141 insertions(+) create mode 100644 dev-python/feedparser/Manifest create mode 100644 dev-python/feedparser/feedparser-5.2.1.ebuild create mode 100644 dev-python/feedparser/files/feedparser-5.2.1-sgmllib.patch create mode 100644 dev-python/feedparser/metadata.xml (limited to 'dev-python/feedparser') diff --git a/dev-python/feedparser/Manifest b/dev-python/feedparser/Manifest new file mode 100644 index 000000000000..c2d7fb08e3c7 --- /dev/null +++ b/dev-python/feedparser/Manifest @@ -0,0 +1,6 @@ +AUX feedparser-5.2.1-sgmllib.patch 2748 SHA256 b9317aa240e254ae38001c04ac6c0994b6f5691ee38f5d9ad3785643ede38cef SHA512 3ef63206b043179f5a09cf1f3d5256aed1ae0c559b99fc0ec4c1de756dd678af8a7672673f864f72c8162705056fb0011ff19b39debfcbd0faf402804869f681 WHIRLPOOL cf00bd92e642a8cbe1fd81f7169156725feb1949f62648ffb89ac35f294fb86cf00803830fa16699f31e3d852091d19665311175f0f567bd53b14121a7b802cd +DIST feedparser-5.2.1.tar.gz 252956 SHA256 bd030652c2d08532c034c27fcd7c85868e7fa3cb2b17f230a44a6bbc92519bf9 SHA512 1fd0c4324e2eff8ef4b15e3793c767290bca562af4a5056fdbdfa12411095530c87a113bb1b9757e532ff63aecb399b18f1e6b753884798eb6b8d3fdf575af81 WHIRLPOOL 7214fbafa15351d9d759b6d281e5edd4cf38f6285e0a2d788933c1336ab0e66c2587ea341773ed956d7a006e9b09f2f769876690eec9374c9f96b464f2c71ba3 +EBUILD feedparser-5.2.1.ebuild 1209 SHA256 3b8821277795d5422e1f0b47c3b79db3054a3cd4e277df8f15888dfe41f4e2a7 SHA512 7a7b2b310ec08041366ac953706c322fef047955a0e68a5b0aa1be66ebcbba8d68b1e7ac6dd70008ed56c0ab05423181ec5c2723f0294296f1418b8cdcb3dfc3 WHIRLPOOL 199a40c52ed482272bbfcc50f670441fd98432f842c550bf34ffe42bdb2fdec83e67aa4ab5cdc0be5b97b7f62e8a61a7fd35ed1e51dc664105938a5ad0b860d2 +MISC ChangeLog 4229 SHA256 ff273ca99d07ea29967dae7d414857844dd1127054d2554c2ff22dc0ff5fabae SHA512 216458756e1befec938e4563a0a9ed99cc745836298b903975a031a07d68b96b40dc6c9d2c30f288c0605209aa8e31eb370910cdb266396e633b4dd6edf0c7e0 WHIRLPOOL 889d8d17076f28d3697e5bf2678b24e99a31b192efedca6a4684dd2d9d8e2ca3f9695c94b745cdf389bddfa9e2bf8eb9051b6508d786fe444b9e2c641f88de17 +MISC ChangeLog-2015 8316 SHA256 06866662463314c475884dd8b90f8cc415f98bfa58551f65b1a95c0ffa41fe86 SHA512 cfdb57af60ee008a27874bdfa99d10f41889629a32bb49d384e57240ac7c780707cef2ce27d3ecaf2014b721be02e2fc209f81974335df127a9096250e186070 WHIRLPOOL a80451615cec876b1f4bc81640dc344911ff53f37822c81ef5d86ceb1ed82b024c69745367908c6ed621dd72df9fe1bf714462475ae16a703b2c26bdfb6dc53d +MISC metadata.xml 545 SHA256 e3e9ff90e29ef8d291b9a14d1a1695c20b5ff381d1a0531e3e659fbddcb6cd65 SHA512 529faf4a7612e461dbae6746acf9e886a0ea497b11996e0c5f89de5fece30b544226fdf02a4e19915d132e40b0abcc5b180cce36b5a9f172cd6364ebe3d3f46d WHIRLPOOL 4b389c1312d6e2df2ad7da8520e597d9558bc51d72087dc046fa569fa9603dfed7f02e11f835273a44330e22c937533dea175f40763f63bf004f9a05a6d387f4 diff --git a/dev-python/feedparser/feedparser-5.2.1.ebuild b/dev-python/feedparser/feedparser-5.2.1.ebuild new file mode 100644 index 000000000000..d137f86feb0f --- /dev/null +++ b/dev-python/feedparser/feedparser-5.2.1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy{,3} ) + +inherit distutils-r1 + +DESCRIPTION="Parse RSS and Atom feeds in Python" +HOMEPAGE="https://github.com/kurtmckee/feedparser https://pypi.python.org/pypi/feedparser" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +# sgmllib is licensed under PSF-2. +LICENSE="BSD-2 PSF-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" +RDEPEND="" + +# Tests have issues with chardet installed, and are just kind of buggy. +RESTRICT="test" + +PATCHES=( + "${FILESDIR}/${P}-sgmllib.patch" +) + +python_prepare_all() { + mv feedparser/sgmllib3.py feedparser/_feedparser_sgmllib.py || die + distutils-r1_python_prepare_all +} + +python_test() { + cp feedparser/feedparsertest.py "${BUILD_DIR}" || die + ln -s "${S}/feedparser/tests" "${BUILD_DIR}/tests" || die + cd "${BUILD_DIR}" || die + if [[ ${EPYTHON} == python3* ]]; then + 2to3 --no-diffs -w -n feedparsertest.py || die + fi + "${PYTHON}" feedparsertest.py || die "Testing failed with ${EPYTHON}" +} diff --git a/dev-python/feedparser/files/feedparser-5.2.1-sgmllib.patch b/dev-python/feedparser/files/feedparser-5.2.1-sgmllib.patch new file mode 100644 index 000000000000..714480560e52 --- /dev/null +++ b/dev-python/feedparser/files/feedparser-5.2.1-sgmllib.patch @@ -0,0 +1,78 @@ +From 812793c07d3202d3f5bc39091aec2e7071d000c8 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping +Date: Sun, 1 Jan 2012 19:30:57 +0100 +Subject: [PATCH] Use shipped sgmllib for Python 3.x + +--- + feedparser/feedparser.py | 19 +++---------------- + setup.py | 2 +- + 2 files changed, 4 insertions(+), 17 deletions(-) + +diff --git a/feedparser/feedparser.py b/feedparser/feedparser.py +index 8275c29..9a8a053 100644 +--- a/feedparser/feedparser.py ++++ b/feedparser/feedparser.py +@@ -204,17 +204,9 @@ else: + try: + import sgmllib + except ImportError: +- # This is probably Python 3, which doesn't include sgmllib anymore +- _SGML_AVAILABLE = 0 ++ import _feedparser_sgmllib as sgmllib + +- # Mock sgmllib enough to allow subclassing later on +- class sgmllib(object): +- class SGMLParser(object): +- def goahead(self, i): +- pass +- def parse_starttag(self, i): +- pass +-else: ++if True: + _SGML_AVAILABLE = 1 + + # sgmllib defines a number of module-level regular expressions that are +@@ -2520,9 +2512,6 @@ class _RelativeURIResolver(_BaseHTMLProcessor): + _BaseHTMLProcessor.unknown_starttag(self, tag, attrs) + + def _resolveRelativeURIs(htmlSource, baseURI, encoding, _type): +- if not _SGML_AVAILABLE: +- return htmlSource +- + p = _RelativeURIResolver(baseURI, encoding, _type) + p.feed(htmlSource) + return p.output() +@@ -2803,8 +2792,6 @@ class _HTMLSanitizer(_BaseHTMLProcessor): + + + def _sanitizeHTML(htmlSource, encoding, _type): +- if not _SGML_AVAILABLE: +- return htmlSource + p = _HTMLSanitizer(encoding, _type) + htmlSource = htmlSource.replace(' + + + + python@gentoo.org + Python + + Parse RSS and Atom feeds in Python. 2000 unit tests. Open source. + + feedparser + kurtmckee/feedparser + feedparser + + -- cgit v1.2.3