[arch-commits] Commit in sugar-activity-read/trunk (PKGBUILD bs4-port.patch)

Balló György bgyorgy at archlinux.org
Sat Jun 24 21:12:08 UTC 2017


    Date: Saturday, June 24, 2017 @ 21:12:06
  Author: bgyorgy
Revision: 240853

upgpkg: sugar-activity-read 118-2

Port to Beautiful Soup 4

Added:
  sugar-activity-read/trunk/bs4-port.patch
Modified:
  sugar-activity-read/trunk/PKGBUILD

----------------+
 PKGBUILD       |   13 +++++++++----
 bs4-port.patch |   32 ++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-06-24 20:24:45 UTC (rev 240852)
+++ PKGBUILD	2017-06-24 21:12:06 UTC (rev 240853)
@@ -4,19 +4,24 @@
 pkgname=sugar-activity-read
 _pkgname=Read
 pkgver=118
-pkgrel=1
+pkgrel=2
 pkgdesc="Sugar activity to read books"
 arch=('any')
 url="https://wiki.sugarlabs.org/go/Activities/Read"
 license=('GPL')
 groups=('sugar-fructose')
-depends=('evince' 'python2-beautifulsoup3' 'sugar-toolkit-gtk3')
-source=(https://download.sugarlabs.org/sources/sucrose/fructose/$_pkgname/$_pkgname-$pkgver.tar.bz2)
-sha256sums=('652c66a08c0f6b98e25c1e4d51ac7caffd4a2beefae8c3fd1209e8a432ec0052')
+depends=('evince' 'python2-beautifulsoup4' 'sugar-toolkit-gtk3')
+source=(https://download.sugarlabs.org/sources/sucrose/fructose/$_pkgname/$_pkgname-$pkgver.tar.bz2
+        bs4-port.patch)
+sha256sums=('652c66a08c0f6b98e25c1e4d51ac7caffd4a2beefae8c3fd1209e8a432ec0052'
+            'dab39eb8658c850a684856a698934791e79e8e68b20132a462583da3f12c1d1c')
 
 prepare() {
   cd $_pkgname-$pkgver
   sed -i 's@^#!.*python$@#!/usr/bin/python2@' readdialog.py setup.py
+
+  # Port to Beautiful Soup 4
+  patch -Np1 -i ../bs4-port.patch
 }
 
 package() {

Added: bs4-port.patch
===================================================================
--- bs4-port.patch	                        (rev 0)
+++ bs4-port.patch	2017-06-24 21:12:06 UTC (rev 240853)
@@ -0,0 +1,32 @@
+From fb84b57f4300b32be2c8d96610e70efaf3c1ddf8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gy=C3=B6rgy=20Ball=C3=B3?= <ballogyor at gmail.com>
+Date: Sat, 24 Jun 2017 23:00:56 +0200
+Subject: [PATCH] Port to Beautiful Soup 4
+
+It's a replacement for Beautiful Soup 3, which has no further development.
+---
+ epubview/jobs.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/epubview/jobs.py b/epubview/jobs.py
+index 152455f..a877c47 100644
+--- a/epubview/jobs.py
++++ b/epubview/jobs.py
+@@ -21,7 +21,7 @@
+ import widgets
+ import math
+ import os.path
+-import BeautifulSoup
++import bs4
+ 
+ import threading
+ 
+@@ -62,7 +62,7 @@ def _start_search(self):
+         return False
+ 
+     def _searchfile(self, fileobj):
+-        soup = BeautifulSoup.BeautifulSoup(fileobj)
++        soup = bs4.BeautifulSoup(fileobj)
+         body = soup.find('body')
+         tags = body.findChildren(True)
+         for tag in tags:



More information about the arch-commits mailing list