Re: [gtk-osx-users] gtk-mac-bundler




On Jun 12, 2017, at 6:04 AM, Guillaume Thiolliere <guillaume thiolliere openmailbox org> wrote:

Hi, I'm interested about create a macos app for a python3 pygobject application.

I installed gtk3 and pygobject with brew (and the application works very well) and tried to package using pyinstaller but there issue with gdkpixbuf. There is no images and FileChooserWidget crash. (gtkiconhelper: gtk ensure_surface_for_gicon assertion failed)

I tried to install gtk3 and pygobject with jhbuild but it doesn't work as when building pygobject there is py3cairo that is missing.

What I would want is to use homebrew pygobject and gtk3 build and package using either pyinstaller or gtk-mac-bundler.
But in the documentation you only mention pygtk but there is some code related pygobject in gtk-mac-bundler so I don't know the state of it.

If you could help us with pyinstaller issue https://github.com/pyinstaller/pyinstaller/issues/1833 it would be awesome

otherwise let me know the state of gtk-mac-bundler regarding pygobject.


Thanks


Please use the gtk-osx-users gnome org mailing list for support. You’ll need to subscribe at https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list.

gtk-mac-bundler is supported only for projects built completely with jhbuild. I’ve heard rumors of it being used with MacPorts projects but I have no direct experience of that. As long as all of the project’s dependencies (*everything* that isn’t provided by a base MacOS installation) are installed in a single prefix—the head of a tree containing bin/, etc/, lib/, and share/--one should be able to get it to work regardless of build source provided one has a solid understanding of one’s project and its dependencies. Your problem with pyinstaller and gdkpixbuf suggests that you might have some studying in your future in order to meet that requirement.

In order to use jhbuild and gtk-osx to build a pygobject project with python3 you must go in two phases because gobject-introspection works only in python2. I’ve set up two meta-modules to make that simpler for Gramps, see https://github.com/gramps-project/gramps/blob/master/mac/gramps.modules. The way it works is that after bootstrapping you build python2 and all of the C libraries that need to be introspected; if you need only the gtk3 stack then meta-gtk-osx-gtk3 and meta-gtk-osx-gtk3-core-themes should do. Next build python3 and make sure that $PREFIX/bin/python points to python3, then build meta-gtk-osx-python3-gtk3. When that’s done you can start a jhbuild shell and build and install your project.

Regards,
John Ralls



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]