Bug 274972 - games/py-mnemosyne: missing dependency and optional Google translate
Summary: games/py-mnemosyne: missing dependency and optional Google translate
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: Nuno Teixeira
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-08 20:09 UTC by Andreas Kempe
Modified: 2023-11-30 23:42 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (eduardo)


Attachments
Update to 2.11 (2.26 KB, patch)
2023-11-29 11:49 UTC, Nuno Teixeira
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kempe 2023-11-08 20:09:02 UTC
To be able to browse cards in Mnemosyne, qt6-base_sqldriver-sqlite needs to be installed. This dependency is not currently pulled in by the Mnemosyne port.

Additionally, there is a hard dependency on py39-googletrans that in turn depends on py39-httpx013. py39-httpx013 conflicts with Dolphin that needs py39-httpx. In PR 247595, Mnemosyne could not be started due to Google Translate not being provided, but I could comment out the Google Translate dependency and start Mnemosyne that starts with

/usr/local/lib/python3.9/site-packages/mnemosyne/libmnemosyne/__init__.py:377: UserWarning: google_trans_new package is not installed. Google translate feature will not be available.

I think the Goole Translate dependency could be made optional via a port option. Personally, I have no need of the translation feature.
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-11-29 09:43:37 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1bb647d1af0170fd4e65e3cca0442262ab6825ca

commit 1bb647d1af0170fd4e65e3cca0442262ab6825ca
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2023-11-29 09:38:54 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2023-11-29 09:43:09 +0000

    games/py-mnemosyne: Add missing run depend

    Add QT sqldriver-sqlite missing run depend needed for browsing cards.

    PR:             274972
    Reported by:    Andreas Kempe
    MFH:            2023Q4

 games/py-mnemosyne/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-11-29 09:46:39 UTC
A commit in branch 2023Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1ee1744a5417d4c0af40e6be211e6330cdc0cb09

commit 1ee1744a5417d4c0af40e6be211e6330cdc0cb09
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2023-11-29 09:38:54 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2023-11-29 09:44:56 +0000

    games/py-mnemosyne: Add missing run depend

    Add QT sqldriver-sqlite missing run depend needed for browsing cards.

    PR:             274972
    Reported by:    Andreas Kempe
    MFH:            2023Q4

    (cherry picked from commit 1bb647d1af0170fd4e65e3cca0442262ab6825ca)

 games/py-mnemosyne/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Comment 3 Nuno Teixeira freebsd_committer freebsd_triage 2023-11-29 09:52:27 UTC
(In reply to Andreas Kempe from comment #0)
Hello Andreas,

I've just committed missing run depends to main and quarterly.

Now I'm investigating why www/py-httpx013 and www/py39-httpx could not coexist on same system:

###
Checking integrity... done (1 conflicting)
  - py39-httpx-0.25.2 conflicts with py39-httpx013-0.13.3_3 on /usr/local/lib/python3.9/site-packages/httpx/__init__.py
###

Thanks
Comment 4 Nuno Teixeira freebsd_committer freebsd_triage 2023-11-29 10:35:57 UTC
(In reply to Nuno Teixeira from comment #3)
(...)

Nevermind, httpx013 is a repo-copy used as a workaround for googletrans 3.0.0.
Looking for an updated version or fork that supports httpx 2x.

https://github.com/ssut/py-googletrans/issues/386
Comment 5 Nuno Teixeira freebsd_committer freebsd_triage 2023-11-29 11:49:47 UTC
Created attachment 246658 [details]
Update to 2.11

- Rename PORTNAME to match PyPI
- Switch to pep517 build
- Remove runtime dep textproc/py-googletrans as upstream change it to google-trans-new = "^1.1.9" not yet ported.
Comment 6 Andreas Kempe 2023-11-29 23:32:37 UTC
I applied the 2.11 patch on 2023Q4 and the functionality I use worked fine. I could study and browse my cards and check my statistics.

One thing I noticed is that the name of the port is changed to mnemosyne_proj in the patch causing a conflict with the current mnemosyne package that had to be manually deinstalled. I'm not sure if this is intentional.
Comment 7 Andreas Kempe 2023-11-29 23:48:16 UTC
I should add that the commented out googletrans row comments out all the subsequent dependencies as well. I had to remove the row to get all the needed dependencies.
Comment 8 commit-hook freebsd_committer freebsd_triage 2023-11-30 10:11:37 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9bf62c5e6bb3faf955c21592dbc340ec350cf111

commit 9bf62c5e6bb3faf955c21592dbc340ec350cf111
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2023-11-30 08:25:13 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2023-11-30 10:01:36 +0000

    games/py-mnemosyne-proj: Update to 2.11

    - Rename to match PyPI name
    - Switch to DISTVERSION
    - Switch to pep517 build
    - Remove run dependency on textproc/py-googletrans as upstream changed
      it to a new and optional dependency, not ported yet (google-trans-new)

    ChangeLog:      https://mnemosyne-proj.org/whats-new
    PR:             274972

 MOVED                                               |  1 +
 games/Makefile                                      |  2 +-
 games/{py-mnemosyne => py-mnemosyne-proj}/Makefile  | 19 +++++++++----------
 games/py-mnemosyne-proj/distinfo (new)              |  3 +++
 games/{py-mnemosyne => py-mnemosyne-proj}/pkg-descr |  0
 games/py-mnemosyne/distinfo (gone)                  |  3 ---
 6 files changed, 14 insertions(+), 14 deletions(-)
Comment 9 Nuno Teixeira freebsd_committer freebsd_triage 2023-11-30 10:15:11 UTC
(In reply to Andreas Kempe from comment #6)
Hello Andreas,

I've renamed port to match PyPI and committed to main.

Cheers
Comment 10 Andreas Kempe 2023-11-30 23:42:01 UTC
(In reply to Nuno Teixeira from comment #9)
Thank you very much for taking the time to work this out!