Created attachment 209985 [details] patch to add dependency The deskutils/calibre port lacks a dependency on textproc/py-markdown. Whet using the "Polish books" feature of calibre (enabled by adding it to a toolbar or menu), the following error is shown: calibre 4.6 embedded-python: False is64bit: True FreeBSD-12.1-STABLE-amd64-64bit-ELF FreeBSD ('64bit', 'ELF') ('FreeBSD', '12.1-STABLE', 'FreeBSD 12.1-STABLE r355284 GENERIC') Python 2.7.17 Linux: ('', '', '') Interface language: None Traceback (most recent call last): File "/usr/local/lib/calibre/calibre/gui2/__init__.py", line 484, in dispatch self.func(*args, **kwargs) File "/usr/local/lib/calibre/calibre/gui2/actions/polish.py", line 546, in book_polished self.report(db.title(book_id, index_is_id=True), book_id, fmts, job, job.result) File "/usr/local/lib/calibre/calibre/gui2/actions/polish.py", line 356, in __call__ self.show_next() File "/usr/local/lib/calibre/calibre/gui2/actions/polish.py", line 384, in show_next self.show_report(*self.reports.pop(0)) File "/usr/local/lib/calibre/calibre/gui2/actions/polish.py", line 359, in show_report from calibre.ebooks.markdown import markdown File "/usr/local/lib/calibre/calibre/startup.py", line 69, in load_module return import_module(fullname[len('calibre.ebooks.'):]) File "/usr/local/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) ImportError: No module named markdown So the markdown module is missing. Adding a dependency to textproc/py-markdown fixes that.
Is this a regression in the latest 4.6.0 version of the port? See Also: Devendor markdown and feedparser https://github.com/kovidgoyal/calibre/pull/927 Update markdown to 2.3.1. https://github.com/kovidgoyal/calibre/commit/cc3466eee1f213a3761ac49da726520f55e18f94 This seems to indicate that markdown comes (or came?) bundled (I haven't verified) Also cant see that calibre.ebooks.markdown module exists in 4.6.0 or master, nor can i see it in the pkg-plist
Other packages (Ubuntu, Arch Linux etc.) also just use a dependency to python-markdown, e.g. https://packages.ubuntu.com/focal/calibre and don't bundle markdown with calibre itself.
Thanks for reporting, this really looks like a new regression due to the updates to the markdown functionality. I did not notice this because I don't use the polish books function. I'm going to add the dependency to the port.
Is the quarterly version also affected?
(In reply to Kubilay Kocak from comment #4) Good question. A quick test shows it is, so I'll merge this change.
A commit references this bug: Author: madpilot Date: Tue Dec 17 19:03:59 UTC 2019 New revision: 520343 URL: https://svnweb.freebsd.org/changeset/ports/520343 Log: Add textproc/py-markdown dependency, required by polish book functionality. PR: 242656 Submitted by: rk@ronald.org MFH: 2019Q4 Changes: head/deskutils/calibre/Makefile
A commit references this bug: Author: madpilot Date: Sat Dec 21 11:34:56 UTC 2019 New revision: 520556 URL: https://svnweb.freebsd.org/changeset/ports/520556 Log: MFH: r520343 Add textproc/py-markdown dependency, required by polish book functionality. PR: 242656 Submitted by: rk@ronald.org Approved by: ports-secteam (joneum) Changes: _U branches/2019Q4/ branches/2019Q4/deskutils/calibre/Makefile
Patch committed and merged to quarterly.