From 35a0a2c65db357cb22405f9f312b9b20adb2d79d Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Nov 18 2012 20:18:06 +0000 Subject: Another better approach to unbundling feedparser. --- diff --git a/calibre-0.8.64-unbundle-feedparser.patch b/calibre-0.8.64-unbundle-feedparser.patch deleted file mode 100644 index e720dea..0000000 --- a/calibre-0.8.64-unbundle-feedparser.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -Nur calibre.orig/recipes/economist_free.recipe calibre/recipes/economist_free.recipe ---- calibre.orig/recipes/economist_free.recipe 2012-08-09 21:33:57.000000000 -0600 -+++ calibre/recipes/economist_free.recipe 2012-08-13 21:01:07.567981819 -0600 -@@ -185,7 +185,7 @@ - lambda x:'')] - - def parse_index(self): -- from calibre.web.feeds.feedparser import parse -+ from feedparser import parse - if self.test: - self.oldest_article = 14.0 - raw = self.index_to_soup( -diff -Nur calibre.orig/recipes/lenta_ru.recipe calibre/recipes/lenta_ru.recipe ---- calibre.orig/recipes/lenta_ru.recipe 2012-08-09 21:33:57.000000000 -0600 -+++ calibre/recipes/lenta_ru.recipe 2012-08-13 21:01:19.778043630 -0600 -@@ -4,7 +4,7 @@ - Lenta.ru - ''' - --from calibre.web.feeds.feedparser import parse -+from feedparser import parse - from calibre.ebooks.BeautifulSoup import Tag - from calibre.web.feeds.news import BasicNewsRecipe - import re -diff -Nur calibre.orig/recipes/vedomosti.recipe calibre/recipes/vedomosti.recipe ---- calibre.orig/recipes/vedomosti.recipe 2012-08-09 21:33:57.000000000 -0600 -+++ calibre/recipes/vedomosti.recipe 2012-08-13 21:01:27.924085824 -0600 -@@ -4,7 +4,7 @@ - Ведомости - ''' - --from calibre.web.feeds.feedparser import parse -+from feedparser import parse - from calibre.ebooks.BeautifulSoup import Tag - from calibre.web.feeds.news import BasicNewsRecipe - diff --git a/calibre.spec b/calibre.spec index 7eff082..fb6cf60 100644 --- a/calibre.spec +++ b/calibre.spec @@ -2,7 +2,7 @@ Name: calibre Version: 0.9.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: E-book converter and library management Group: Applications/Multimedia License: GPLv3 @@ -20,8 +20,6 @@ Source0: %{name}-%{version}-nofonts.tar.xz Source1: generate-tarball.sh Source2: calibre-mount-helper Patch1: %{name}-no-update.patch -# Unbundle the copy of feedparser. See bug #847825 -Patch2: calibre-0.8.64-unbundle-feedparser.patch BuildRequires: python >= 2.6 BuildRequires: python-devel >= 2.6 @@ -89,8 +87,6 @@ RTF, TXT, PDF and LRS. # don't check for new upstream version (that's what packagers do) %patch1 -p1 -b .no-update -# unbundle feedparser -%patch2 -p1 -b .unbundle-feedparser # dos2unix newline conversion %{__sed} -i 's/\r//' src/calibre/web/feeds/recipes/* @@ -183,6 +179,13 @@ rm -rf %{buildroot}%{_libdir}/%{name}/cal/trac # rm empty feedparser files. rm -rf %{buildroot}%{_libdir}/%{name}/%{name}/web/feeds/feedparser.* +ln -s %{python_sitelib}/feedparser.py \ + %{buildroot}%{_libdir}/%{name}/%{name}/web/feeds/feedparser.py +ln -s %{python_sitelib}/feedparser.pyc \ + %{buildroot}%{_libdir}/%{name}/%{name}/web/feeds/feedparser.pyc +ln -s %{python_sitelib}/feedparser.pyo \ + %{buildroot}%{_libdir}/%{name}/%{name}/web/feeds/feedparser.pyo + # link to system fonts after we have deleted (see Source0) the non-free ones # http://bugs.calibre-ebook.com/ticket/3832 ln -s %{_datadir}/fonts/liberation/LiberationSans-Regular.ttf \ @@ -274,6 +277,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{python_sitelib}/init_calibre.py* %changelog +* Sun Nov 18 2012 Kevin Fenzi 0.9.6-2 +- Another better approach to unbundling feedparser. + * Fri Nov 09 2012 Kevin Fenzi 0.9.6-1 - Update to 0.9.6