Date: Fri, 14 Feb 2014 02:19:50 GMT From: Stephen R Guglielmo <srg@guglielmo.us> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/186751: [patch] Remove textproc/py-feedparser dependency on textproc/py-chardet and other fixes Message-ID: <201402140219.s1E2JoYk073443@cgiserv.freebsd.org> Resent-Message-ID: <201402140220.s1E2K0h1075045@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 186751 >Category: ports >Synopsis: [patch] Remove textproc/py-feedparser dependency on textproc/py-chardet and other fixes >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Feb 14 02:20:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Stephen R Guglielmo >Release: 10.0-RELEASE >Organization: >Environment: >Description: textproc/py-feedparser does not actually depend on textproc/py-chardet. It is optional character detection. textproc/py-chardet can be installed manually and imported to the application using the textproc/py-feedparser library if it's required. This actually introduces a bug on python 3 which causes a "decoding str is not supported" error to pop up with certain feeds. See issue #403: http://code.google.com/p/feedparser/issues/detail?id=403 I also made a few other changes while I was digging around: -Rewrote pkg-descr (including a dead URL update) -Changed MASTER_SITES -Corrected the license from BSD to MIT -Defined a minimum python version -Made the DOCS option actually work by adding an if statement -Bumped the port revision, of course. >How-To-Repeat: >Fix: Attached patch Patch attached with submission follows: diff -ru py-feedparser/Makefile py-feedparser.new/Makefile --- py-feedparser/Makefile 2014-01-29 22:13:00.000000000 -0500 +++ py-feedparser.new/Makefile 2014-02-13 21:13:48.508490421 -0500 @@ -1,36 +1,36 @@ # Created by: ijliao # $FreeBSD: head/textproc/py-feedparser/Makefile 341799 2014-01-30 03:13:00Z miwi $ -PORTNAME= feedparser -PORTVERSION= 5.1.3 -PORTREVISION= 1 -CATEGORIES= textproc python -MASTER_SITES= CHEESESHOP -PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} - -MAINTAINER= sbz@FreeBSD.org -COMMENT= RSS feed parser written in Python +PORTNAME=feedparser +PORTVERSION=5.1.3 +PORTREVISION=2 +CATEGORIES=textproc python +MASTER_SITES=MASTER_SITE_GOOGLE_CODE +PKGNAMEPREFIX=${PYTHON_PKGNAMEPREFIX} -LICENSE= BSD +MAINTAINER=sbz@FreeBSD.org +COMMENT=Newsfeed parser library written in Python -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}chardet>0:${PORTSDIR}/textproc/py-chardet +LICENSE=MIT -USE_PYTHON= yes -USE_BZIP2= yes +USE_PYTHON=2.4+ +USE_BZIP2=yes USE_PYDISTUTILS=yes -PYDISTUTILS_AUTOPLIST= yes +PYDISTUTILS_AUTOPLIST=yes -OPTIONS_DEFINE= DOCS +OPTIONS_DEFINE=DOCS -PORTDOCS= NEWS PKG-INFO README +PORTDOCS=NEWS PKG-INFO README .include <bsd.port.options.mk> post-install: - @${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR} +.if ${PORT_OPTIONS:MDOCS} + ${MKDIR} ${STAGEDIR}${DOCSDIR} + cd ${WORKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/ +.endif regression-test: extract - @(cd ${WRKSRC}/${PORTNAME}; ${PYTHON_CMD} ${PORTNAME}test.py) + cd ${WRKSRC}/${PORTNAME}; ${PYTHON_CMD} ${PORTNAME}test.py .include <bsd.port.mk> diff -ru py-feedparser/pkg-descr py-feedparser.new/pkg-descr --- py-feedparser/pkg-descr 2014-01-22 10:44:51.000000000 -0500 +++ py-feedparser.new/pkg-descr 2014-02-13 21:13:48.508490421 -0500 @@ -1,16 +1,11 @@ -Universal Feed Parser is a Python module for downloading and parsing -syndicated feeds. It can handle RSS 0.90, Netscape RSS 0.91, Userland -RSS 0.91, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0, Atom, and -CDF feeds. +Feedparser is a Python library that parses feeds in all known formats, +including Atom, RSS, and RDF. It runs on Python 2.4 and above. -To use Universal Feed Parser, you will need Python 2.1 or later. -Universal Feed Parser is not meant to run standalone; it is a module -for you to use as part of a larger Python program. +Feedparser is not meant to run standalone; it is a module for you to +use as part of a larger Python program. -Universal Feed Parser is easy to use; the module is self-contained in -a single file, feedparser.py, and it has only one public function, -parse. parse takes a number of arguments, but only one is required, -and it can be a URL, a local filename, or a raw string containing feed -data in any format. +Feedparser is easy to use; the module is self-contained in a single +file and it has only one public function. It can parse a URL, a +local filename, or a raw string containing feed data in any format. -WWW: http://feedparser.org/ +WWW: http://code.google.com/p/feedparser/ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402140219.s1E2JoYk073443>