summaryrefslogtreecommitdiff
path: root/print/py-pisa
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2018-01-08 22:11:06 +0000
committerjoerg <joerg@pkgsrc.org>2018-01-08 22:11:06 +0000
commitf26df52fd9aef1c802b7f4240e373156fbad0d4f (patch)
treeff3a2db618ba86de1d19a73d5f3e8c8014efabb8 /print/py-pisa
parent01e03d3e46c89c8348a5044f5f10e25c3eb4861d (diff)
downloadpkgsrc-f26df52fd9aef1c802b7f4240e373156fbad0d4f.tar.gz
Deal with py-html5lib API changes. Bump revision.
Diffstat (limited to 'print/py-pisa')
-rw-r--r--print/py-pisa/Makefile11
-rw-r--r--print/py-pisa/distinfo4
-rw-r--r--print/py-pisa/patches/patch-sx_pisa3_pisa__context.py16
-rw-r--r--print/py-pisa/patches/patch-sx_pisa3_pisa__parser.py29
4 files changed, 53 insertions, 7 deletions
diff --git a/print/py-pisa/Makefile b/print/py-pisa/Makefile
index b01678b0485..b5eedd98100 100644
--- a/print/py-pisa/Makefile
+++ b/print/py-pisa/Makefile
@@ -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 @@ PYTHON_VERSIONS_INCOMPATIBLE= 34 35 36 # not ported as of 3.0.33
# 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 --git a/print/py-pisa/distinfo b/print/py-pisa/distinfo
index acc80567e5b..6a387735b61 100644
--- a/print/py-pisa/distinfo
+++ b/print/py-pisa/distinfo
@@ -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 --git a/print/py-pisa/patches/patch-sx_pisa3_pisa__context.py b/print/py-pisa/patches/patch-sx_pisa3_pisa__context.py
new file mode 100644
index 00000000000..59b8a4a98d0
--- /dev/null
+++ b/print/py-pisa/patches/patch-sx_pisa3_pisa__context.py
@@ -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 --git a/print/py-pisa/patches/patch-sx_pisa3_pisa__parser.py b/print/py-pisa/patches/patch-sx_pisa3_pisa__parser.py
new file mode 100644
index 00000000000..2da246acf3f
--- /dev/null
+++ b/print/py-pisa/patches/patch-sx_pisa3_pisa__parser.py
@@ -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"))
+