indygreg / PyOxidizer

A modern Python application packaging and distribution tool
Mozilla Public License 2.0
5.47k stars 239 forks source link

Including PyGObject #146

Open aparcar opened 5 years ago

aparcar commented 5 years ago

I'm trying to use PyOxidizer to build a zim binary, however it fails as with the following message:

Traceback (most recent call last):
  File "zim", line 40, in <module>
  File "zim.main", line 22, in <module>
  File "zim.fs", line 27, in <module>
  File "zim.signals", line 7, in <module>
  File "gi", line 42, in <module>
ImportError: cannot import name '_gi' from 'gi' (unknown location)
ERROR: Could not find python module files in path:

Try setting PYTHONPATH

The required package is PyGObject, is it possible to link it somehow into the app?

indygreg commented 5 years ago

It isn't obvious from this report what is going on. Probably PyGObject making assumptions about modules being on the filesystem.

You can try using an app-relative install rule for zim / PyGObject work around this. https://pyoxidizer.readthedocs.io/en/latest/config.html#install-locations