[arch-commits] Commit in urlwatch/trunk (PKGBUILD escape.patch)

Daniel M. Capella polyzen at archlinux.org
Mon May 4 08:27:58 UTC 2020


    Date: Monday, May 4, 2020 @ 08:27:58
  Author: polyzen
Revision: 624716

upgpkg: urlwatch 2.18-1

Modified:
  urlwatch/trunk/PKGBUILD
Deleted:
  urlwatch/trunk/escape.patch

--------------+
 PKGBUILD     |   41 +++++++++++++++++++++--------------------
 escape.patch |   34 ----------------------------------
 2 files changed, 21 insertions(+), 54 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-05-04 08:22:33 UTC (rev 624715)
+++ PKGBUILD	2020-05-04 08:27:58 UTC (rev 624716)
@@ -1,36 +1,37 @@
-# Maintainer: Balló György <ballogyor+arch at gmail dot com>
-# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
+# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
+# Contributor: Balló György <ballogyor+arch at gmail dot com>
+# Contributor: Maxim Baz <$pkgname at maximbaz dot com>
 # Contributor: Skydrome <skydrome at i2pmail.org>
 # Contributor: Allan McRae <allan at archlinux.org>
 
 pkgname=urlwatch
-pkgver=2.17
-pkgrel=3
-pkgdesc="Tool for monitoring webpages for updates"
+pkgver=2.18
+pkgrel=1
+pkgdesc='Tool for monitoring webpages for updates'
 arch=('any')
-url="https://thp.io/2008/urlwatch/"
+url=https://thp.io/2008/urlwatch/
 license=('BSD')
-depends=('python-appdirs' 'python-keyring' 'python-lxml' 'python-cssselect' 'python-minidb' 'python-requests' 'python-yaml')
+depends=('python-appdirs' 'python-cssselect' 'python-keyring' 'python-lxml'
+         'python-minidb' 'python-requests' 'python-setuptools' 'python-yaml')
 optdepends=('lynx: convert HTML to plain text'
             'python-beautifulsoup4: prettify HTML'
             'python-html2text: convert HTML to plain text')
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/thp/urlwatch/archive/${pkgver}.tar.gz"
-        "escape.patch")
-sha256sums=('83101382c2cbc6e84752f12cdbdefed67b3018085fa5ffb68923d6b1fe97854d'
-            '421653801e8c397c5147db30a67fcf44aaff8f471af33db83bf16847c2f90ecc')
+checkdepends=('python-pycodestyle' 'python-nose')
+source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz")
+sha256sums=('b556d1176683f0b7058d7bd34cddfdadbc86ab9551fe5e674aaf55c89696bd9d')
 
-prepare() {
-    cd "${pkgname}-${pkgver}"
-    patch -Np1 -i "${srcdir}/escape.patch"
+build() {
+  cd $pkgname-$pkgver
+  python setup.py build
 }
 
-build() {
-    cd "${pkgname}-${pkgver}"
-    python3 setup.py build
+check() {
+  cd $pkgname-$pkgver
+  nosetests
 }
 
 package() {
-    cd "${pkgname}-${pkgver}"
-    python3 setup.py install --root="${pkgdir}" --optimize=1
-    install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+  cd $pkgname-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+  install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname COPYING
 }

Deleted: escape.patch
===================================================================
--- escape.patch	2020-05-04 08:22:33 UTC (rev 624715)
+++ escape.patch	2020-05-04 08:27:58 UTC (rev 624716)
@@ -1,34 +0,0 @@
-From 7d1e89237f547ce57fa52360a5f8822474982780 Mon Sep 17 00:00:00 2001
-From: cfbao <cfbao.is at gmail.com>
-Date: Tue, 29 Oct 2019 23:37:57 -0400
-Subject: [PATCH] Replace `cgi.escape` with `html.escape`
-
-`cgi.escape` is unsafe and removed in Python 3.8.
----
- lib/urlwatch/reporters.py | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/lib/urlwatch/reporters.py b/lib/urlwatch/reporters.py
-index 29d7fd0..5de0b3a 100644
---- a/lib/urlwatch/reporters.py
-+++ b/lib/urlwatch/reporters.py
-@@ -38,7 +38,7 @@
- import os
- import sys
- import time
--import cgi
-+import html
- import functools
- 
- import requests
-@@ -140,8 +140,8 @@ def __str__(self):
-         return self.s
- 
-     def format(self, *args, **kwargs):
--        return str(self).format(*(cgi.escape(str(arg)) for arg in args),
--                                **{k: cgi.escape(str(v)) for k, v in kwargs.items()})
-+        return str(self).format(*(html.escape(str(arg)) for arg in args),
-+                                **{k: html.escape(str(v)) for k, v in kwargs.items()})
- 
- 
- class HtmlReporter(ReporterBase):


More information about the arch-commits mailing list