Sunday, March 01, 2020

update: converters/py-html2text

Hi ports@,

here's an update for converters/py-html2text to version '2020.1.16'.
Changes on the software:

2020.1.16
* Add type annotations.
* Add support for Python 3.8.
* Performance improvements when ``wrap_links`` is ``False`` (the
default).
* Configure setuptools using setup.cfg.

2019.9.26
* Fix long blockquotes wrapping.
* Remove the trailing whitespaces that were added after wrapping list
items & blockquotes.
* Remove support for Python ≤ 3.4. Now requires Python 3.5+.
* Fix memory leak when processing a document containing a ``<abbr>``
tag.
* Fix ``AttributeError`` when reading text from stdin.
* Fix ``UnicodeEncodeError`` when writing output to stdout.

2019.8.11
* Add support for wrapping list items.
* Fix #201: handle &lrm;/&rlm; marks mid-text within stressed tags or
right after stressed tags.
* Feature #213: ``images_as_html`` config option to always generate an
``img`` html tag. preserves "height", "width" and "alt" if possible.
* Remove support for end-of-life Pythons. Now requires Python 2.7 or
3.4+.
* Remove support for retrieving HTML over the network.
* Add ``__main__.py`` module to allow running the CLI using ``python -m
html2text ...``.
* Fix #238: correct spacing when a HTML entity follows a non-stressed
tags which follow a stressed tag.
* Remove unused or deprecated:
* ``html2text.compat.escape()``
* ``html2text.config.RE_UNESCAPE``
* ``html2text.HTML2Text.replaceEntities()``
* ``html2text.HTML2Text.unescape()``
* ``html2text.unescape()``
* Fix #208: handle LEFT-TO-RIGHT MARK after a stressed tag.

About the port itself, I enabled pytest and made it py3 only. All its
comsumers seem to be py3 only. A commit for quirks and
converters/Makefile will follow once this has ok(s).

All tests pass for me on amd64. As for the consumers, all their
regression tests bahave the same before and after the update. Here are
the results for reference:

* mail/rss2email: tests hang for eternity
* productivity/tryton/5.0/trytond: all tests pass
* productivity/tryton/5.2/trytond: all tests pass
* www/odoo
PRIVSEP prevents build, seems like a dependency not in ports:

Searching for xlwt
Reading https://pypi.org/simple/xlwt/
Download error on https://pypi.org/simple/xlwt/: [Errno -5] no address associated with name -- Some packages may not be found!
Couldn't find index page for 'xlwt' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.org/simple/
Download error on https://pypi.org/simple/: [Errno -5] no address associated with name -- Some packages may not be found!
No local packages or working download links found for xlwt
error: Could not find suitable distribution for Requirement.parse('xlwt')

* www/urlwatch: all tests pass
* www/weboob: 2 tests fail. Both because of network timeout,
I assume PRIVSEP is doing its thing here too.

Comments ? ok ?

Index: Makefile
===================================================================
RCS file: /home/cvs/ports/converters/py-html2text/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- Makefile 12 Jul 2019 20:43:51 -0000 1.17
+++ Makefile 1 Mar 2020 15:48:35 -0000
@@ -2,10 +2,9 @@

COMMENT = HTML to markdown-formatted text converter

-MODPY_EGG_VERSION = 2018.1.9
+MODPY_EGG_VERSION = 2020.1.16
DISTNAME = html2text-${MODPY_EGG_VERSION}
PKGNAME = py-${DISTNAME}
-REVISION = 0

CATEGORIES = converters
HOMEPAGE = http://alir3z4.github.io/html2text/
@@ -17,9 +16,10 @@ MODULES = lang/python

MODPY_PI = Yes
MODPY_SETUPTOOLS = Yes
+MODPY_PYTEST = Yes

FLAVORS = python3
-FLAVOR ?=
+FLAVOR = python3

post-install:
mv ${PREFIX}/bin/html2text ${PREFIX}/bin/${MODPY_PY_PREFIX}html2text
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/converters/py-html2text/distinfo,v
retrieving revision 1.7
diff -u -p -r1.7 distinfo
--- distinfo 21 Jan 2019 21:20:27 -0000 1.7
+++ distinfo 1 Mar 2020 15:48:42 -0000
@@ -1,2 +1,2 @@
-SHA256 (html2text-2018.1.9.tar.gz) = YnUU+zDnVms3vmkA3ybCx4oDDMnmIRvaYE2BgSM7zdQ=
-SIZE (html2text-2018.1.9.tar.gz) = 52211
+SHA256 (html2text-2020.1.16.tar.gz) = 4pYxjhawWd25f3qKHWpcHXr0VEBJoB4mFzHS1cwne7s=
+SIZE (html2text-2020.1.16.tar.gz) = 49464
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/ports/converters/py-html2text/pkg/PLIST,v
retrieving revision 1.4
diff -u -p -r1.4 PLIST
--- pkg/PLIST 27 Apr 2016 21:06:31 -0000 1.4
+++ pkg/PLIST 1 Mar 2020 15:49:59 -0000
@@ -1,4 +1,6 @@
@comment $OpenBSD: PLIST,v 1.4 2016/04/27 21:06:31 jca Exp $
+@conflict py-html2text-*
+@pkgpath converters/py-html2text
bin/${MODPY_PY_PREFIX}html2text
lib/python${MODPY_VERSION}/site-packages/html2text/
lib/python${MODPY_VERSION}/site-packages/html2text-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/
@@ -9,13 +11,18 @@ lib/python${MODPY_VERSION}/site-packages
lib/python${MODPY_VERSION}/site-packages/html2text-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/not-zip-safe
lib/python${MODPY_VERSION}/site-packages/html2text-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/top_level.txt
lib/python${MODPY_VERSION}/site-packages/html2text/__init__.py
+lib/python${MODPY_VERSION}/site-packages/html2text/__main__.py
${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/html2text/${MODPY_PYCACHE}/
lib/python${MODPY_VERSION}/site-packages/html2text/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/html2text/${MODPY_PYCACHE}__main__.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/html2text/${MODPY_PYCACHE}cli.${MODPY_PYC_MAGIC_TAG}pyc
-lib/python${MODPY_VERSION}/site-packages/html2text/${MODPY_PYCACHE}compat.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/html2text/${MODPY_PYCACHE}config.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/html2text/${MODPY_PYCACHE}elements.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/html2text/${MODPY_PYCACHE}typing.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/html2text/${MODPY_PYCACHE}utils.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/html2text/cli.py
-lib/python${MODPY_VERSION}/site-packages/html2text/compat.py
lib/python${MODPY_VERSION}/site-packages/html2text/config.py
+lib/python${MODPY_VERSION}/site-packages/html2text/elements.py
+lib/python${MODPY_VERSION}/site-packages/html2text/py.typed
+lib/python${MODPY_VERSION}/site-packages/html2text/typing.py
lib/python${MODPY_VERSION}/site-packages/html2text/utils.py

--
Paco Esteban.
0x5818130B8A6DBC03

No comments:

Post a Comment