[arch-commits] Commit in python-bleach/repos/community-staging-any (3 files)

Felix Yan felixonmars at archlinux.org
Fri Nov 1 14:56:25 UTC 2019


    Date: Friday, November 1, 2019 @ 14:56:24
  Author: felixonmars
Revision: 522040

archrelease: copy trunk to community-staging-any

Added:
  python-bleach/repos/community-staging-any/PKGBUILD
    (from rev 522039, python-bleach/trunk/PKGBUILD)
  python-bleach/repos/community-staging-any/pytest5.patch
    (from rev 522039, python-bleach/trunk/pytest5.patch)
Deleted:
  python-bleach/repos/community-staging-any/PKGBUILD

---------------+
 PKGBUILD      |  118 ++++++++++++++++++++++++++++----------------------------
 pytest5.patch |   23 ++++++++++
 2 files changed, 84 insertions(+), 57 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2019-11-01 14:56:09 UTC (rev 522039)
+++ PKGBUILD	2019-11-01 14:56:24 UTC (rev 522040)
@@ -1,57 +0,0 @@
-# Maintainer: Johannes Löthberg <johannes at kyriasis.com>
-
-pkgbase=python-bleach
-pkgname=(python-bleach python2-bleach)
-pkgver=3.1.0
-pkgrel=2
-
-pkgdesc="An easy whitelist-based HTML-sanitizing tool"
-url="https://pypi.org/project/bleach/"
-arch=('any')
-license=('Apache')
-makedepends=('python'
-             'python-setuptools'
-             'python-webencodings'
-             'python2'
-             'python2-setuptools'
-              'python2-webencodings')
-checkdepends=('python-pytest'
-              'python2-pytest')
-
-source=(https://pypi.org/packages/source/b/bleach/bleach-$pkgver.tar.gz)
-
-sha256sums=('3fdf7f77adcf649c9911387df51254b813185e32b2c6619f690b593a617e19fa')
-
-prepare() {
-	cp -a bleach-$pkgver{,-python2}
-}
-
-build() {
-	cd "$srcdir"/bleach-$pkgver
-	python setup.py build
-
-	cd "$srcdir"/bleach-$pkgver-python2
-	python2 setup.py build
-}
-
-check() {
-	cd "$srcdir"/bleach-$pkgver
-	python -m pytest
-
-	cd "$srcdir"/bleach-$pkgver-python2
-	python2 -m pytest
-}
-
-package_python-bleach() {
-	depends=('python-webencodings')
-
-	cd "$srcdir"/bleach-$pkgver
-	python setup.py install --root="$pkgdir" --optimize=1
-}
-
-package_python2-bleach() {
-	depends=('python2-webencodings')
-
-	cd "$srcdir"/bleach-$pkgver-python2
-	python2 setup.py install --root="$pkgdir" --optimize=1
-}

Copied: python-bleach/repos/community-staging-any/PKGBUILD (from rev 522039, python-bleach/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2019-11-01 14:56:24 UTC (rev 522040)
@@ -0,0 +1,61 @@
+# Maintainer: Johannes Löthberg <johannes at kyriasis.com>
+
+pkgbase=python-bleach
+pkgname=(python-bleach python2-bleach)
+pkgver=3.1.0
+pkgrel=3
+
+pkgdesc="An easy whitelist-based HTML-sanitizing tool"
+url="https://pypi.org/project/bleach/"
+arch=('any')
+license=('Apache')
+makedepends=('python'
+             'python-setuptools'
+             'python-webencodings'
+             'python2'
+             'python2-setuptools'
+              'python2-webencodings')
+checkdepends=('python-pytest'
+              'python2-pytest')
+
+source=(https://pypi.org/packages/source/b/bleach/bleach-$pkgver.tar.gz
+        pytest5.patch)
+
+sha256sums=('3fdf7f77adcf649c9911387df51254b813185e32b2c6619f690b593a617e19fa'
+            'a1d3dea566e7c56540b83bcd006c730f6c71fe531570fa2c5cccf0a917070bc6')
+
+prepare() {
+	# https://github.com/mozilla/bleach/pull/483
+	patch -Np1 -d bleach-$pkgver <pytest5.patch
+	cp -a bleach-$pkgver{,-python2}
+}
+
+build() {
+	cd "$srcdir"/bleach-$pkgver
+	python setup.py build
+
+	cd "$srcdir"/bleach-$pkgver-python2
+	python2 setup.py build
+}
+
+check() {
+	cd "$srcdir"/bleach-$pkgver
+	python -m pytest
+
+	cd "$srcdir"/bleach-$pkgver-python2
+	python2 -m pytest
+}
+
+package_python-bleach() {
+	depends=('python-webencodings')
+
+	cd "$srcdir"/bleach-$pkgver
+	python setup.py install --root="$pkgdir" --optimize=1
+}
+
+package_python2-bleach() {
+	depends=('python2-webencodings')
+
+	cd "$srcdir"/bleach-$pkgver-python2
+	python2 setup.py install --root="$pkgdir" --optimize=1
+}

Copied: python-bleach/repos/community-staging-any/pytest5.patch (from rev 522039, python-bleach/trunk/pytest5.patch)
===================================================================
--- pytest5.patch	                        (rev 0)
+++ pytest5.patch	2019-11-01 14:56:24 UTC (rev 522040)
@@ -0,0 +1,23 @@
+From 9201b4708a90dc1f841285c6ec47814f6ed17495 Mon Sep 17 00:00:00 2001
+From: Emin Mastizada <emin at linux.com>
+Date: Wed, 16 Oct 2019 17:47:27 +0300
+Subject: [PATCH] Support pytest5 syntax for tests
+
+diff --git a/tests/test_clean.py b/tests/test_clean.py
+index e306cc5..d041ffa 100644
+--- a/tests/test_clean.py
++++ b/tests/test_clean.py
+@@ -24,11 +24,11 @@ def test_only_text_is_cleaned():
+ 
+     with pytest.raises(TypeError) as e:
+         clean(some_type)
+-    assert "argument cannot be of 'type' type" in str(e)
++    assert "argument cannot be of 'type' type" in str(e.value)
+ 
+     with pytest.raises(TypeError) as e:
+         clean(no_type)
+-    assert "NoneType" in str(e)
++    assert "NoneType" in str(e.value)
+ 
+ 
+ def test_empty():



More information about the arch-commits mailing list