[arch-commits] Commit in cmark/trunk (PKGBUILD python3.8-normalize-test.patch)
Jelle van der Waa
jelle at archlinux.org
Sun May 31 15:58:59 UTC 2020
Date: Sunday, May 31, 2020 @ 15:58:59
Author: jelle
Revision: 387969
Rebuild for reproducible builds
Add a patch for python 3.8 compatibility for tests.
Added:
cmark/trunk/python3.8-normalize-test.patch
Modified:
cmark/trunk/PKGBUILD
--------------------------------+
PKGBUILD | 10 +++++++---
python3.8-normalize-test.patch | 32 ++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-05-31 15:36:08 UTC (rev 387968)
+++ PKGBUILD 2020-05-31 15:58:59 UTC (rev 387969)
@@ -3,7 +3,7 @@
pkgname=cmark
pkgver=0.29.0
-pkgrel=1
+pkgrel=2
pkgdesc="CommonMark parsing and rendering library and program in C"
arch=('x86_64')
url="https://github.com/jgm/cmark"
@@ -10,11 +10,15 @@
license=('custom:BSD2')
depends=('glibc')
makedepends=('cmake' 'python')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/jgm/cmark/archive/$pkgver.tar.gz")
-sha512sums=('06eb110cfd90c9e980c022b7588e28864d15a4da5d07d61ad4b27c6de47367492b9e58e9434e62b07517aa6dc484f17af13916808be3188f38c37d20cbf33112')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/jgm/cmark/archive/$pkgver.tar.gz" python3.8-normalize-test.patch)
+sha512sums=('06eb110cfd90c9e980c022b7588e28864d15a4da5d07d61ad4b27c6de47367492b9e58e9434e62b07517aa6dc484f17af13916808be3188f38c37d20cbf33112'
+ '74f2566b06fc9ea856d1ef784a1e72bd88eddcc2429d1009f43f6c1467eb6f0a4267c41fe93a585087b95032f72849209a0be9d97298b4a8129bb6329113b087')
prepare() {
mkdir -p build
+
+ cd ${srcdir}/${pkgname}-${pkgver}
+ patch -Np1 -i ${srcdir}/python3.8-normalize-test.patch
}
build() {
Added: python3.8-normalize-test.patch
===================================================================
--- python3.8-normalize-test.patch (rev 0)
+++ python3.8-normalize-test.patch 2020-05-31 15:58:59 UTC (rev 387969)
@@ -0,0 +1,32 @@
+From 68c3a91166347a32a57fb81223750a63cfd92105 Mon Sep 17 00:00:00 2001
+From: John MacFarlane <jgm at berkeley.edu>
+Date: Wed, 27 Nov 2019 22:04:16 -0800
+Subject: [PATCH] normalize.py: use html.escape instead of cgi.escape.
+
+Closes #313.
+---
+ test/normalize.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/test/normalize.py b/test/normalize.py
+index 6073bf01..f8ece18d 100644
+--- a/test/normalize.py
++++ b/test/normalize.py
+@@ -13,7 +13,7 @@ class HTMLParseError(Exception):
+ from html.entities import name2codepoint
+ import sys
+ import re
+-import cgi
++import html
+
+ # Normalization code, adapted from
+ # https://github.com/karlcow/markdown-testsuite/
+@@ -66,7 +66,7 @@ def handle_starttag(self, tag, attrs):
+ self.output += ("=" + '"' +
+ urllib.quote(urllib.unquote(v), safe='/') + '"')
+ elif v != None:
+- self.output += ("=" + '"' + cgi.escape(v,quote=True) + '"')
++ self.output += ("=" + '"' + html.escape(v,quote=True) + '"')
+ self.output += ">"
+ self.last_tag = tag
+ self.last = "starttag"
More information about the arch-commits
mailing list