Bug 247063 - [NEW PORT] editors/setzer: LaTeX editor written in Python with Gtk
Summary: [NEW PORT] editors/setzer: LaTeX editor written in Python with Gtk
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Fernando Apesteguía
URL:
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2020-06-07 19:50 UTC by Greg V
Modified: 2020-07-09 19:33 UTC (History)
2 users (show)

See Also:


Attachments
setzer.patch (66.04 KB, patch)
2020-06-07 19:50 UTC, Greg V
no flags Details | Diff
setzer.patch v2 (66.36 KB, patch)
2020-06-26 15:21 UTC, Greg V
no flags Details | Diff
setzer.patch v3 (66.19 KB, patch)
2020-07-09 11:50 UTC, Greg V
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Fernando Apesteguía freebsd_committer 2020-06-18 05:56:14 UTC
Hi Greg,

Thanks for the patch. The port builds fine basically everywhere, but when I try to run it, I get this backtrace:

$ setzer 
Traceback (most recent call last):
  File "/usr/local/bin/setzer", line 26, in <module>
    from setzer.workspace.workspace import Workspace
  File "/usr/local/lib/python3.7/site-packages/setzer/workspace/workspace.py", line 22, in <module>
    from setzer.document.document import Document, LaTeXDocument, BibTeXDocument
  File "/usr/local/lib/python3.7/site-packages/setzer/document/document.py", line 31, in <module>
    import setzer.document.document_builder as document_builder
  File "/usr/local/lib/python3.7/site-packages/setzer/document/document_builder.py", line 20, in <module>
    import setzer.document.build_system.build_system as build_system
  File "/usr/local/lib/python3.7/site-packages/setzer/document/build_system/build_system.py", line 30, in <module>
    from setzer.app.service_locator import ServiceLocator
  File "/usr/local/lib/python3.7/site-packages/setzer/app/service_locator.py", line 20, in <module>
    from xdg.BaseDirectory import xdg_config_home
ModuleNotFoundError: No module named 'xdg'

Would you mind checking? Maybe a missing RUN_DEPENDS?
Comment 2 Greg V 2020-06-26 15:21:05 UTC
Created attachment 215963 [details]
setzer.patch v2

oh, right.

RUN_DEPENDS=   ${PYTHON_PKGNAMEPREFIX}xdg>=0:devel/py-xdg@${PY_FLAVOR}
Comment 3 Fernando Apesteguía freebsd_committer 2020-06-27 11:12:16 UTC
Sorry, still not right :S

Traceback (most recent call last):
  File "/usr/local/bin/setzer", line 26, in <module>
    from setzer.workspace.workspace import Workspace
  File "/usr/local/lib/python3.7/site-packages/setzer/workspace/workspace.py", line 22, in <module>
    from setzer.document.document import Document, LaTeXDocument, BibTeXDocument
  File "/usr/local/lib/python3.7/site-packages/setzer/document/document.py", line 44, in <module>
    import setzer.document.preview.preview as preview
  File "/usr/local/lib/python3.7/site-packages/setzer/document/preview/preview.py", line 19, in <module>
    gi.require_version('Poppler', '0.18')
  File "/usr/local/lib/python3.7/site-packages/gi/__init__.py", line 130, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Poppler not available
Comment 4 Fernando Apesteguía freebsd_committer 2020-07-08 10:15:15 UTC
ping!
Comment 5 Greg V 2020-07-09 11:50:33 UTC
Created attachment 216338 [details]
setzer.patch v3

added poppler-glib dependency
Comment 6 Fernando Apesteguía freebsd_committer 2020-07-09 15:32:55 UTC
The error changed. Still...

$ setzer
Traceback (most recent call last):
  File "/usr/local/bin/setzer", line 47, in do_startup
    self.settings = ServiceLocator.get_settings()
  File "/usr/local/lib/python3.7/site-packages/setzer/app/service_locator.py", line 96, in get_settings
    ServiceLocator.settings = settingscontroller.Settings(ServiceLocator.get_config_folder())
  File "/usr/local/lib/python3.7/site-packages/setzer/app/settings.py", line 41, in __init__
    self.set_defaults()
  File "/usr/local/lib/python3.7/site-packages/setzer/app/settings.py", line 83, in set_defaults
    self.defaults['preferences']['spellchecking_language_code'] = Gspell.Language.get_default().get_code()
AttributeError: 'NoneType' object has no attribute 'get_code'
Traceback (most recent call last):
  File "/usr/local/bin/setzer", line 91, in do_activate
    self.activate()
  File "/usr/local/bin/setzer", line 95, in activate
    self.workspace = Workspace()
  File "/usr/local/lib/python3.7/site-packages/setzer/workspace/workspace.py", line 54, in __init__
    self.settings = ServiceLocator.get_settings()
  File "/usr/local/lib/python3.7/site-packages/setzer/app/service_locator.py", line 96, in get_settings
    ServiceLocator.settings = settingscontroller.Settings(ServiceLocator.get_config_folder())
  File "/usr/local/lib/python3.7/site-packages/setzer/app/settings.py", line 41, in __init__
    self.set_defaults()
  File "/usr/local/lib/python3.7/site-packages/setzer/app/settings.py", line 83, in set_defaults
    self.defaults['preferences']['spellchecking_language_code'] = Gspell.Language.get_default().get_code()
AttributeError: 'NoneType' object has no attribute 'get_code'
Comment 7 Greg V 2020-07-09 19:33:39 UTC
(In reply to Fernando Apesteguía from comment #6)
Looks like you don't have a dictionary gspell/enchant can use.
Would be kinda weird to add a dependency on e.g. English to this port I think.

Raised an issue for running w/o a dictionary: https://github.com/cvfosammmm/Setzer/issues/118