Bug 246084 - graphics/py-mcomix: unbreak with non-default python
Summary: graphics/py-mcomix: unbreak with non-default python
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: Jan Beich
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2020-05-01 10:45 UTC by Jan Beich
Modified: 2020-06-05 09:13 UTC (History)
1 user (show)

See Also:
shoesoft: maintainer-feedback+


Attachments
v1 (17.97 KB, patch)
2020-05-01 10:45 UTC, Jan Beich
no flags Details | Diff
v1.1 (17.96 KB, patch)
2020-05-01 10:49 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2020-05-01 10:45:45 UTC
Created attachment 213984 [details]
v1

Upstream supports down to Python 3.5 but the port fails to build with anything but 3.7. After fixing py35 and py36 work fine but py38 only builds but fails to run.

$ poudriere testport -j 113i386 graphics/py-mcomix@py38
[...]
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: %%PYTHON_SITELIBDIR%%/mcomix/__pycache__/__init__.cpython-38.pyc
Error: Orphaned: %%PYTHON_SITELIBDIR%%/mcomix/__pycache__/about_dialog.cpython-38.pyc
Error: Orphaned: %%PYTHON_SITELIBDIR%%/mcomix/__pycache__/anime_tools.cpython-38.pyc
[...]
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: %%PYTHON_SITELIBDIR%%/mcomix/__pycache__/__init__.cpython-37.pyc
Error: Missing: %%PYTHON_SITELIBDIR%%/mcomix/__pycache__/about_dialog.cpython-37.pyc
Error: Missing: %%PYTHON_SITELIBDIR%%/mcomix/__pycache__/anime_tools.cpython-37.pyc
[...]

$ pkg install py38-mcomix
$ mcomix foo.jpg
Traceback (most recent call last):
  File "/usr/local/bin/mcomix", line 33, in <module>
    mcomix.run.run()
  File "/usr/local/lib/python3.8/site-packages/mcomix/run.py", line 118, in run
    from gi.repository import Gdk, GdkPixbuf, Gtk, GLib
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
  File "/usr/local/lib/python3.8/site-packages/gi/importer.py", line 145, in load_module
    importlib.import_module('gi.repository.' + dep.split("-")[0])
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
  File "/usr/local/lib/python3.8/site-packages/gi/importer.py", line 145, in load_module
    importlib.import_module('gi.repository.' + dep.split("-")[0])
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
  File "/usr/local/lib/python3.8/site-packages/gi/importer.py", line 145, in load_module
    importlib.import_module('gi.repository.' + dep.split("-")[0])
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
  File "/usr/local/lib/python3.8/site-packages/gi/importer.py", line 146, in load_module
    dynamic_module = load_overrides(introspection_module)
  File "/usr/local/lib/python3.8/site-packages/gi/overrides/__init__.py", line 125, in load_overrides
    override_mod = importlib.import_module(override_package_name)
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/local/lib/python3.8/site-packages/gi/overrides/GLib.py", line 86, in <module>
    class _VariantCreator(object):
  File "/usr/local/lib/python3.8/site-packages/gi/overrides/GLib.py", line 89, in _VariantCreator
    'b': GLib.Variant.new_boolean,
  File "/usr/local/lib/python3.8/site-packages/gi/module.py", line 221, in __getattr__
    wrapper = metaclass(name, bases, dict_)
TypeError: 'StructMeta' object is not iterable
Comment 1 Jan Beich freebsd_committer freebsd_triage 2020-05-01 10:49:29 UTC
Created attachment 213986 [details]
v1.1

Oops, don't disable py38 here as the error comes from a dependency.
Comment 2 Stefan Ehmann 2020-05-01 15:22:40 UTC
Thanks for the patch, looks good to me.
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-05-01 15:41:21 UTC
A commit references this bug:

Author: jbeich
Date: Fri May  1 15:40:32 UTC 2020
New revision: 533556
URL: https://svnweb.freebsd.org/changeset/ports/533556

Log:
  graphics/py-mcomix: unbreak with non-default python

  ===> Checking for items in STAGEDIR missing from pkg-plist
  Error: Orphaned: %%PYTHON_SITELIBDIR%%/mcomix/__pycache__/__init__.cpython-38.pyc
  Error: Orphaned: %%PYTHON_SITELIBDIR%%/mcomix/__pycache__/about_dialog.cpython-38.pyc
  Error: Orphaned: %%PYTHON_SITELIBDIR%%/mcomix/__pycache__/anime_tools.cpython-38.pyc
  [...]
  ===> Checking for items in pkg-plist which are not in STAGEDIR
  Error: Missing: %%PYTHON_SITELIBDIR%%/mcomix/__pycache__/__init__.cpython-37.pyc
  Error: Missing: %%PYTHON_SITELIBDIR%%/mcomix/__pycache__/about_dialog.cpython-37.pyc
  Error: Missing: %%PYTHON_SITELIBDIR%%/mcomix/__pycache__/anime_tools.cpython-37.pyc
  [...]

  PR:		246084
  Approved by:	Stefan Ehmann (maintainer)

Changes:
  head/graphics/py-mcomix/Makefile
  head/graphics/py-mcomix/pkg-plist
Comment 4 Jan Beich freebsd_committer freebsd_triage 2020-06-05 09:13:17 UTC
py38-mcomix works fine after ports r537996.