Bug 242656 - deskutils/calibre: Missing dependency to textproc/py-markdown
Summary: deskutils/calibre: Missing dependency to textproc/py-markdown
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Guido Falsi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-16 01:04 UTC by rk
Modified: 2019-12-21 11:36 UTC (History)
3 users (show)

See Also:
madpilot: maintainer-feedback+
madpilot: merge-quarterly+


Attachments
patch to add dependency (654 bytes, patch)
2019-12-16 01:04 UTC, rk
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description rk 2019-12-16 01:04:15 UTC
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.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-12-16 01:23:46 UTC
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
Comment 2 rk 2019-12-16 16:06:53 UTC
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.
Comment 3 Guido Falsi freebsd_committer freebsd_triage 2019-12-16 16:41:11 UTC
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.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2019-12-17 00:59:56 UTC
Is the quarterly version also affected?
Comment 5 Guido Falsi freebsd_committer freebsd_triage 2019-12-17 19:01:48 UTC
(In reply to Kubilay Kocak from comment #4)

Good question. A quick test shows it is, so I'll merge this change.
Comment 6 commit-hook freebsd_committer freebsd_triage 2019-12-17 19:04:50 UTC
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
Comment 7 commit-hook freebsd_committer freebsd_triage 2019-12-21 11:35:41 UTC
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
Comment 8 Guido Falsi freebsd_committer freebsd_triage 2019-12-21 11:36:24 UTC
Patch committed and merged to quarterly.