pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/py-pisa Deal with py-html5lib API changes. Bump ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/aa86116484eb
branches:  trunk
changeset: 373709:aa86116484eb
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Jan 08 22:11:06 2018 +0000

description:
Deal with py-html5lib API changes. Bump revision.

diffstat:

 print/py-pisa/Makefile                                |  11 +++---
 print/py-pisa/distinfo                                |   4 +-
 print/py-pisa/patches/patch-sx_pisa3_pisa__context.py |  16 ++++++++++
 print/py-pisa/patches/patch-sx_pisa3_pisa__parser.py  |  29 +++++++++++++++++++
 4 files changed, 53 insertions(+), 7 deletions(-)

diffs (97 lines):

diff -r d28cfdc30458 -r aa86116484eb print/py-pisa/Makefile
--- a/print/py-pisa/Makefile    Mon Jan 08 22:09:48 2018 +0000
+++ b/print/py-pisa/Makefile    Mon Jan 08 22:11:06 2018 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.19 2017/09/30 07:52:18 wiz Exp $
+# $NetBSD: Makefile,v 1.20 2018/01/08 22:11:06 joerg Exp $
 
 DISTNAME=      pisa-3.0.33
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    textproc print www python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=p/pisa/}
 
@@ -19,10 +19,9 @@
 
 # remove CRs: fixes patching on Darwin and stops pkglint from complaining
 pre-patch:
-.for f in css.py cssDOMElementInterface.py
-       ${TR} -d '\r' < ${WRKSRC}/sx/w3c/${f} > ${WRKSRC}/sx/w3c/${f}.new
-       ${MV} ${WRKSRC}/sx/w3c/${f}.new ${WRKSRC}/sx/w3c/${f}
-.endfor
+       cd ${WRKSRC} && for f in sx/*/*.py; do \
+               ${TR} -d '\r' < $$f > $${f}.new && ${MV} $${f}.new $$f; \
+       done
 
 .include "../../lang/python/egg.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r d28cfdc30458 -r aa86116484eb print/py-pisa/distinfo
--- a/print/py-pisa/distinfo    Mon Jan 08 22:09:48 2018 +0000
+++ b/print/py-pisa/distinfo    Mon Jan 08 22:11:06 2018 +0000
@@ -1,9 +1,11 @@
-$NetBSD: distinfo,v 1.9 2017/06/29 20:02:02 joerg Exp $
+$NetBSD: distinfo,v 1.10 2018/01/08 22:11:06 joerg Exp $
 
 SHA1 (pisa-3.0.33.tar.gz) = 3d7e644b96b7c8f98bfd5823a163c3badd662209
 RMD160 (pisa-3.0.33.tar.gz) = 1479865d1f0b14f4a37c74fc8aae7e72e9d0efac
 SHA512 (pisa-3.0.33.tar.gz) = 5d11d717734ca30876697ce25c77f381a560f4b266b2dbd9f2445ac9b39e2750cc3ff31603d9a1cba6ed51a047fca38ac95a2a4dddf88b238aa5c0d6f810a975
 Size (pisa-3.0.33.tar.gz) = 4500555 bytes
 SHA1 (patch-aa) = 39354cac1592787d43622c04ef776f13b39450ca
+SHA1 (patch-sx_pisa3_pisa__context.py) = 3822f8b4e155bf6d2cbe57304d641dee459151fe
+SHA1 (patch-sx_pisa3_pisa__parser.py) = 54a582b177ec5866ad2b3ba0db8d7a3bc9b8ad51
 SHA1 (patch-sx_pisa3_pisa__reportlab.py) = 0eb4a042b151d94ee8d3d12fc00b28fee4b31e48
 SHA1 (patch-sx_pisa3_pisa__util.py) = 130f9ac339239b71fc6a4920c0cadcccdbc1a913
diff -r d28cfdc30458 -r aa86116484eb print/py-pisa/patches/patch-sx_pisa3_pisa__context.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/py-pisa/patches/patch-sx_pisa3_pisa__context.py     Mon Jan 08 22:11:06 2018 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-sx_pisa3_pisa__context.py,v 1.1 2018/01/08 22:11:06 joerg Exp $
+
+--- sx/pisa3/pisa_context.py.orig      2018-01-08 14:18:52.579405122 +0000
++++ sx/pisa3/pisa_context.py
+@@ -40,7 +40,10 @@ from reportlab.lib.fonts import addMappi
+ 
+ from sx.w3c import css, cssDOMElementInterface
+ 
+-from html5lib.sanitizer import *
++try:
++    from html5lib.filters.sanitizer import *
++except ImportError:
++    from html5lib.sanitizer import *
+ 
+ import logging
+ log = logging.getLogger("ho.pisa")
diff -r d28cfdc30458 -r aa86116484eb print/py-pisa/patches/patch-sx_pisa3_pisa__parser.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/py-pisa/patches/patch-sx_pisa3_pisa__parser.py      Mon Jan 08 22:11:06 2018 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-sx_pisa3_pisa__parser.py,v 1.1 2018/01/08 22:11:06 joerg Exp $
+
+--- sx/pisa3/pisa_parser.py.orig       2018-01-08 15:08:43.919276904 +0000
++++ sx/pisa3/pisa_parser.py
+@@ -26,7 +26,11 @@ import os
+ import os.path
+ 
+ import html5lib
+-from html5lib import treebuilders, serializer, treewalkers, inputstream
++from html5lib import treebuilders, serializer, treewalkers
++try:
++    from html5lib import inputstream
++except ImportError:
++    from html5lib import _inputstream as inputstream
+ from xml.dom import Node
+ import xml.dom.minidom
+ 
+@@ -612,9 +616,8 @@ def pisaParser(src, c, default_css="", x
+                  log.error("%r is not a valid encoding", encoding)
+     
+     document = parser.parse(
+-        src,
+-        encoding=encoding)
+-        
++        src)
++
+     if xml_output:        
+         xml_output.write(document.toprettyxml(encoding="utf8"))    
+ 



Home | Main Index | Thread Index | Old Index