[arch-commits] Commit in python-bleach/trunk (2 files)

Johannes Löthberg demize at archlinux.org
Sat Jan 21 19:16:00 UTC 2017


    Date: Saturday, January 21, 2017 @ 19:15:59
  Author: demize
Revision: 208304

upgpkg: python-bleach 1.5.0-5

Use vendored copy of html5lib until bleach is updated. #52602

Added:
  python-bleach/trunk/0001-Make-bleach-allow-for-vendored-html5lib-version.patch
Modified:
  python-bleach/trunk/PKGBUILD

------------------------------------------------------------+
 0001-Make-bleach-allow-for-vendored-html5lib-version.patch |   46 +++++++++++
 PKGBUILD                                                   |   24 ++++-
 2 files changed, 63 insertions(+), 7 deletions(-)

Added: 0001-Make-bleach-allow-for-vendored-html5lib-version.patch
===================================================================
--- 0001-Make-bleach-allow-for-vendored-html5lib-version.patch	                        (rev 0)
+++ 0001-Make-bleach-allow-for-vendored-html5lib-version.patch	2017-01-21 19:15:59 UTC (rev 208304)
@@ -0,0 +1,46 @@
+From 51294ef3e472aee3008583750f6e2dbe4c8c5adb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johannes at kyriasis.com>
+Date: Sat, 21 Jan 2017 20:08:12 +0100
+Subject: [PATCH] Make bleach allow for vendored html5lib version
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
+---
+ bleach/__init__.py | 4 ++++
+ setup.py           | 3 ---
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/bleach/__init__.py b/bleach/__init__.py
+index 09dad63..c6f5929 100644
+--- a/bleach/__init__.py
++++ b/bleach/__init__.py
+@@ -3,6 +3,10 @@
+ from __future__ import unicode_literals
+ import logging
+ import re
++import os
++import sys
++
++sys.path.insert(0, os.path.dirname(__file__))
+ 
+ import html5lib
+ from html5lib.sanitizer import HTMLSanitizer
+diff --git a/setup.py b/setup.py
+index 908928e..bdcecf6 100644
+--- a/setup.py
++++ b/setup.py
+@@ -15,9 +15,6 @@ tests_require = [
+     
+ install_requires = [
+     'six',
+-    # 3 9s up to but not including 8 9s, but not 4 9s or 5 9s because they're
+-    # busted
+-    'html5lib>=0.999,!=0.9999,!=0.99999,<0.99999999',
+ ]
+ 
+ 
+-- 
+2.11.0
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-01-21 18:25:59 UTC (rev 208303)
+++ PKGBUILD	2017-01-21 19:15:59 UTC (rev 208304)
@@ -3,7 +3,7 @@
 pkgbase=python-bleach
 pkgname=(python-bleach python2-bleach)
 pkgver=1.5.0
-pkgrel=3
+pkgrel=5
 
 pkgdesc="An easy whitelist-based HTML-sanitizing tool"
 url="http://pypi.python.org/pypi/bleach"
@@ -11,15 +11,22 @@
 license=('Apache')
 
 makedepends=('python-setuptools'
-             'python-html5lib'
+             'python-html5lib-7-9s'
              'python2-setuptools'
-             'python2-html5lib')
+             'python2-html5lib-7-9s')
 
-source=("python-bleach-$pkgver.tar.gz::https://pypi.org/packages/source/b/bleach/bleach-$pkgver.tar.gz")
+source=("python-bleach-$pkgver.tar.gz::https://pypi.org/packages/source/b/bleach/bleach-$pkgver.tar.gz"
+        "html5lib-python-0.9999999.tar.gz::https://github.com/html5lib/html5lib-python/archive/0.9999999.tar.gz"
+        "0001-Make-bleach-allow-for-vendored-html5lib-version.patch")
 
-md5sums=('b663300efdf421b3b727b19d7be9c7e7')
+md5sums=('b663300efdf421b3b727b19d7be9c7e7'
+         '2ca78b1ec5852779bc121a97da6e8d4d'
+         'c7f318607346ce3f151bebd73f15864e')
 
 prepare() {
+	(cd bleach-$pkgver
+	patch -p1 <"$srcdir"/0001-Make-bleach-allow-for-vendored-html5lib-version.patch)
+
 	cp -a bleach-$pkgver{,-python2}
 }
 
@@ -27,12 +34,14 @@
 	cd "$srcdir"/bleach-$pkgver
 	python setup.py build
 
+
 	cd "$srcdir"/bleach-$pkgver-python2
 	python2 setup.py build
 }
 
 package_python-bleach() {
-	depends=('python-html5lib')
+	cd "$srcdir"/html5lib-python-0.9999999
+	python setup.py install --root="$pkgdir"/usr/lib/python3.6/site-packages --install-purelib=bleach --optimize=1
 
 	cd "$srcdir"/bleach-$pkgver
 	python setup.py install --root="$pkgdir" --optimize=1
@@ -39,7 +48,8 @@
 }
 
 package_python2-bleach() {
-	depends=('python2-html5lib')
+	cd "$srcdir"/html5lib-python-0.9999999
+	python2 setup.py install --root="$pkgdir"/usr/lib/python2.7/site-packages --install-purelib=bleach --optimize=1
 
 	cd "$srcdir"/bleach-$pkgver-python2
 	python2 setup.py install --root="$pkgdir" --optimize=1



More information about the arch-commits mailing list