New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTK+3: port to libpeas, re-add Python plugin support #71

Closed
rezso opened this Issue Apr 7, 2015 · 12 comments

Comments

Projects
None yet
5 participants
@rezso
Contributor

rezso commented Apr 7, 2015

the error message:
https://gist.github.com/rezso/b83eab47d9859913a98c

without gobject-introspection the build is successful.

@monsta

This comment has been minimized.

Show comment
Hide comment
@monsta

monsta Apr 22, 2015

Member

The latest git master version builds fine for me with GTK+3 and introspection enabled.
Not sure why you mentioned pygtk - it's GTK+2 only, in GTK+3 it's replaced by introspection (PyGObject).

Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported

Please make sure you have the whole MATE (well, at least the packages required for building eom) built with GTK+3.

Member

monsta commented Apr 22, 2015

The latest git master version builds fine for me with GTK+3 and introspection enabled.
Not sure why you mentioned pygtk - it's GTK+2 only, in GTK+3 it's replaced by introspection (PyGObject).

Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported

Please make sure you have the whole MATE (well, at least the packages required for building eom) built with GTK+3.

@rezso

This comment has been minimized.

Show comment
Hide comment
@rezso

rezso Apr 22, 2015

Contributor

It seems to me, that the python support requires pygtk.
checking whether Python support is requested... autodetect
checking for a Python interpreter with version >= 2.3... python
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages
sed: can't read ${exec_prefix}/lib/python2.7/config/Makefile: No such file or directory
sed: can't read ${exec_prefix}/lib/python2.7/config/Makefile: No such file or directory
checking for PYGTK... no
configure: WARNING: No package 'pygobject-2.0' found
No package 'pygtk-2.0' found
configure: WARNING: Disabling python support

Contributor

rezso commented Apr 22, 2015

It seems to me, that the python support requires pygtk.
checking whether Python support is requested... autodetect
checking for a Python interpreter with version >= 2.3... python
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages
sed: can't read ${exec_prefix}/lib/python2.7/config/Makefile: No such file or directory
sed: can't read ${exec_prefix}/lib/python2.7/config/Makefile: No such file or directory
checking for PYGTK... no
configure: WARNING: No package 'pygobject-2.0' found
No package 'pygtk-2.0' found
configure: WARNING: Disabling python support

@monsta

This comment has been minimized.

Show comment
Hide comment
@monsta

monsta Apr 23, 2015

Member

Ah... right, sorry. I totally forgot that in Debian we build GTK+3 version of eom with --disable-python flag.

Member

monsta commented Apr 23, 2015

Ah... right, sorry. I totally forgot that in Debian we build GTK+3 version of eom with --disable-python flag.

@derlaft

This comment has been minimized.

Show comment
Hide comment
@derlaft

derlaft May 20, 2015

Have the same problem here with 1.10.0. Build log: https://s3.amazonaws.com/archive.travis-ci.org/jobs/63279991/log.txt (at the very end)

Everything seems to be compiled with gtk2, eom built with --disable-python

derlaft commented May 20, 2015

Have the same problem here with 1.10.0. Build log: https://s3.amazonaws.com/archive.travis-ci.org/jobs/63279991/log.txt (at the very end)

Everything seems to be compiled with gtk2, eom built with --disable-python

@flexiondotorg flexiondotorg added this to the Gtk+3 milestone Aug 27, 2015

@monsta monsta added the confirmed label Sep 25, 2015

@raveit65 raveit65 changed the title from Compiling 1.9.90 with gtk3, pygtk and gobject-introspection fails to GTK3: Compiling 1.9.90 with gtk3, pygtk and gobject-introspection fails Nov 11, 2015

@raveit65

This comment has been minimized.

Show comment
Hide comment
@raveit65

raveit65 Dec 14, 2015

Member

Building with introspection works now after
3d34cc1
But there are some introspections build warnings left.

Member

raveit65 commented Dec 14, 2015

Building with introspection works now after
3d34cc1
But there are some introspections build warnings left.

@monsta monsta changed the title from GTK3: Compiling 1.9.90 with gtk3, pygtk and gobject-introspection fails to GTK+3: port to libpeas, re-add Python plugin support Dec 8, 2016

@monsta

This comment has been minimized.

Show comment
Hide comment
@monsta

monsta Dec 8, 2016

Member

Ok, porting to libpeas is done, what's left is to enable Python loader and find some Python plugins to test it.

Member

monsta commented Dec 8, 2016

Ok, porting to libpeas is done, what's left is to enable Python loader and find some Python plugins to test it.

@raveit65

This comment has been minimized.

Show comment
Hide comment
@raveit65

raveit65 Dec 12, 2016

Member

I guess this can only be tested by @yselkowitz when the python plugins are ported to libpeas.
https://github.com/yselkowitz/eom-plugins

Member

raveit65 commented Dec 12, 2016

I guess this can only be tested by @yselkowitz when the python plugins are ported to libpeas.
https://github.com/yselkowitz/eom-plugins

@monsta

This comment has been minimized.

Show comment
Hide comment
@monsta

monsta Dec 20, 2016

Member

I made a simple Python plugin for testing. It consists of two small files.

sidebar-test.py:

from gi.repository import GObject, Gtk, Peas

class SidebarTest(GObject.Object, Peas.Activatable):
    __gtype_name__ = "SidebarTestPlugin"

    object = GObject.Property(type=GObject.Object)

    def __init__(self):
        GObject.Object.__init__(self)

    def do_activate(self):
        self.label = Gtk.Label.new("Just a test")
        self.label.show()

        window = self.object
        window.get_sidebar().add_page("Sidebar Test", self.label)

    def do_deactivate(self):
        window = self.object
        window.get_sidebar().remove_page(self.label)

sidebar-test.plugin:

[Plugin]
Loader=python3
Module=sidebar-test
IAge=1
Name=Sidebar Test
Description=Shows a test message in the sidebar
Icon=text-x-python
Authors=Vlad Orlov <monsta@inbox.ru>
Copyright=Copyright © 2016 Vlad Orlov <monsta@inbox.ru>
Website=http://www.mate-desktop.org

How to test:

  • install introspection data for eom and libpeas and Python plugin loader from libpeas
  • copy both sidebar-test.* files from here to eom plugins dir (~/.config/mate/eom/plugins/)
  • enable this plugin in the preferences
  • load some image (needed to show the sidebar)
  • press Ctrl-F9 to reveal the sidebar

The sidebar should show a test message.

[update: changed loader from python to python3 to work with 1.21]

Member

monsta commented Dec 20, 2016

I made a simple Python plugin for testing. It consists of two small files.

sidebar-test.py:

from gi.repository import GObject, Gtk, Peas

class SidebarTest(GObject.Object, Peas.Activatable):
    __gtype_name__ = "SidebarTestPlugin"

    object = GObject.Property(type=GObject.Object)

    def __init__(self):
        GObject.Object.__init__(self)

    def do_activate(self):
        self.label = Gtk.Label.new("Just a test")
        self.label.show()

        window = self.object
        window.get_sidebar().add_page("Sidebar Test", self.label)

    def do_deactivate(self):
        window = self.object
        window.get_sidebar().remove_page(self.label)

sidebar-test.plugin:

[Plugin]
Loader=python3
Module=sidebar-test
IAge=1
Name=Sidebar Test
Description=Shows a test message in the sidebar
Icon=text-x-python
Authors=Vlad Orlov <monsta@inbox.ru>
Copyright=Copyright © 2016 Vlad Orlov <monsta@inbox.ru>
Website=http://www.mate-desktop.org

How to test:

  • install introspection data for eom and libpeas and Python plugin loader from libpeas
  • copy both sidebar-test.* files from here to eom plugins dir (~/.config/mate/eom/plugins/)
  • enable this plugin in the preferences
  • load some image (needed to show the sidebar)
  • press Ctrl-F9 to reveal the sidebar

The sidebar should show a test message.

[update: changed loader from python to python3 to work with 1.21]

@raveit65

This comment has been minimized.

Show comment
Hide comment
@raveit65

raveit65 Dec 31, 2016

Member

aha, i nedd to install Python-2 plugin loader from libpeas, there is also one package for python3.
And i see the sidebar after enable this in view menu.

Member

raveit65 commented Dec 31, 2016

aha, i nedd to install Python-2 plugin loader from libpeas, there is also one package for python3.
And i see the sidebar after enable this in view menu.

@monsta

This comment has been minimized.

Show comment
Hide comment
@monsta

monsta Dec 31, 2016

Member

Ah, so in Fedora they're in separate packages too? It's the same in Debian now.

Member

monsta commented Dec 31, 2016

Ah, so in Fedora they're in separate packages too? It's the same in Debian now.

@raveit65

This comment has been minimized.

Show comment
Hide comment
@raveit65

raveit65 Dec 31, 2016

Member

yes, one for python3 and one for python2.

Member

raveit65 commented Dec 31, 2016

yes, one for python3 and one for python2.

@monsta

This comment has been minimized.

Show comment
Hide comment
@monsta

monsta Jan 2, 2017

Member

Ok, I think it's done. I guess #108 can be closed as well now.

Member

monsta commented Jan 2, 2017

Ok, I think it's done. I guess #108 can be closed as well now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment