Created attachment 407048 [details] Calibre ebuild with use flag to select system/bundled BeautifulSoup Calibre plugins that depend on bundled BeautifulSoup don't seem to be working. At least one such plugin is KoboUtilities, similarly written plugins probably suffer from the same problem. Mine is set to update reading status on connect, this fails with the following: calibre, version 2.31.0 ERROR: Unhandled exception: <b>ImportError</b>:No module named BeautifulSoup calibre 2.31 isfrozen: False is64bit: True Linux-3.19.3-gentoo-x86_64-Intel-R-_Core-TM-_i5_CPU_M_540_@_2.53GHz-with-gentoo-2.2 Linux ('64bit', 'ELF') ('Linux', '3.19.3-gentoo', '#1 SMP PREEMPT Sat Apr 4 08:07:12 EEST 2015') Python 2.7.9 Linux: ('Gentoo Base System', '2.2', '') Successfully initialized third party plugins: DeDRM && KoboTouchExtended && Generate Cover && Kobo Utilities && KePub Output && Goodreads Traceback (most recent call last): File "calibre_plugins.koboutilities.dialogs", line 216, in do_books File "calibre_plugins.koboutilities.dialogs", line 262, in do_queue File "calibre_plugins.koboutilities.action", line 1950, in _store_queue_job File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 179, in load_module exec compiled in mod.__dict__ File "calibre_plugins.koboutilities.jobs", line 21, in <module> ImportError: No module named BeautifulSoup The line 21 in question from jobs.py in the plugin archive: from calibre.ebooks.BeautifulSoup import BeautifulStoneSoup The bundled BeautifulSoup is removed in ebuild during src_prepare: # use system beautifulsoup, instead of bundled rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \ || die "could not remove bundled beautifulsoup" find "${S}" -type f -name \*.py -exec \ sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \ || die "could not sed bundled beautifulsoup out of the source tree" I tested with KoboUtilities plugin modified the same way and original ebuild (works), and original KoboUtilities plugin with modified ebuild (works). I have no idea how common it is for plugins to import the bundled module this way, thus not a clue about the impact. Attached the modified ebuild I used for testing.
This seems to be a problem with the plugin, not really with our ebuild. I would vote for "WONTFIX".
Given that Calibre doesn't appear to present an option not to bundle BeautifulSoup, and the plugin expects to find it where it is bundled, I would still say the problem is caused by the ebuild expressly removing the bundled module. There is no problem with the plugin when used in a unmodified Calibre.
Is this problem still present in the latest version, or can we close this bug?
I did some quick testing and could not reproduce the problem using version 2.84.0 from Portage tree. Hopefully it stays that way.