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: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Rainer Hurling
URL:
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2020-06-07 19:50 UTC by Val Packett
Modified: 2020-10-18 06:50 UTC (History)
2 users (show)

See Also:


Attachments
setzer.patch (66.04 KB, patch)
2020-06-07 19:50 UTC, Val Packett
no flags Details | Diff
setzer.patch v2 (66.36 KB, patch)
2020-06-26 15:21 UTC, Val Packett
no flags Details | Diff
setzer.patch v3 (66.19 KB, patch)
2020-07-09 11:50 UTC, Val Packett
no flags Details | Diff
setzer.patch v4 (70.48 KB, patch)
2020-10-17 15:45 UTC, Val Packett
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 freebsd_triage 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 Val Packett 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 freebsd_triage 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 freebsd_triage 2020-07-08 10:15:15 UTC
ping!
Comment 5 Val Packett 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 freebsd_triage 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 Val Packett 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
Comment 8 Fernando Apesteguía freebsd_committer freebsd_triage 2020-10-02 07:23:30 UTC
Back to the pool.
Comment 9 Rainer Hurling freebsd_committer freebsd_triage 2020-10-02 07:34:39 UTC
(In reply to Greg V from comment #7)

Hi Greg,

Version 0.3.2 is out for some time now[1], the latest discussed error from comment #6 should be solved now[2]. Give it another try?


[1] https://github.com/cvfosammmm/Setzer/tags
[2] https://github.com/cvfosammmm/Setzer/issues/118
Comment 10 Val Packett 2020-10-17 15:45:23 UTC
Created attachment 218842 [details]
setzer.patch v4

Here's the latest version
Comment 11 Rainer Hurling freebsd_committer freebsd_triage 2020-10-17 19:36:11 UTC
Hi Greg,

I just opened a Review on Phabricator[1]. This has to be reviewed at least by arrowd or tcberner.

[1] https://reviews.freebsd.org/D26834
Comment 12 commit-hook freebsd_committer freebsd_triage 2020-10-18 06:48:11 UTC
A commit references this bug:

Author: rhurlin
Date: Sun Oct 18 06:47:58 UTC 2020
New revision: 552622
URL: https://svnweb.freebsd.org/changeset/ports/552622

Log:
  editors/setzer: New port, version 0.3.4

  Write LaTeX documents with an easy to use yet full-featured editor.

  Rapidly evolving editor, based on Python 3 and Gtk3.

  Homepage[1] and repository[2]:
  [1] https://www.cvfosammmm.org/setzer/
  [2] https://github.com/cvfosammmm/Setzer

  PR:		247063
  Submitted by:	Greg V <greg@unrelenting.technology> (maintainer)
  Approved by:	tcberner (mentor)
  Differential Revision:	https://reviews.freebsd.org/D26834

Changes:
  head/editors/Makefile
  head/editors/setzer/
  head/editors/setzer/Makefile
  head/editors/setzer/distinfo
  head/editors/setzer/pkg-descr
  head/editors/setzer/pkg-plist
Comment 13 Rainer Hurling freebsd_committer freebsd_triage 2020-10-18 06:50:27 UTC
Committed, thanks :)