This repository has been archived by the owner. It is now read-only.

Request: PyGObject 3 #12901

Closed
SimonSapin opened this Issue Jun 18, 2012 · 22 comments

Comments

Projects
None yet
6 participants
@SimonSapin

Hi,

I’m not sure this is the right channel for such requests. Please redirect me if it is not. I would like to see PyGObject 3.x packaged for OS X.

WeasyPrint is a Python project that uses Pango’s introspection through PyGObject. Users can generally manage to install the Python parts themselves, but PyGObject is more tricky: the current version in Homebrew is 2.28, but we need 3.x. These are somewhat incompatible: linux distributions generally make separate packages for both.

Thanks.

@samueljohn

This comment has been minimized.

Show comment
Hide comment
@samueljohn

samueljohn Jun 18, 2012

Contributor

Is 3.x for python3?
Or is it a completely different software? Would one want to have both installed at the same time?

Contributor

samueljohn commented Jun 18, 2012

Is 3.x for python3?
Or is it a completely different software? Would one want to have both installed at the same time?

@SimonSapin

This comment has been minimized.

Show comment
Hide comment
@SimonSapin

SimonSapin Jun 18, 2012

PyGObject 3.x exists for both python3 and python2, just like PyGObject 2.x. So there can be up to 4 different combinations of these (more if you care about various pythonX.Y versions)

It is an evolution of the same software but yes, they should be possible to install at the same time as they are not compatible.

There are also attempts to do this in Macports: https://trac.macports.org/ticket/34914 https://trac.macports.org/ticket/33054

For this to be useful, "introspection" needs to be enabled in relevant libraries like Pango.

PyGObject 3.x exists for both python3 and python2, just like PyGObject 2.x. So there can be up to 4 different combinations of these (more if you care about various pythonX.Y versions)

It is an evolution of the same software but yes, they should be possible to install at the same time as they are not compatible.

There are also attempts to do this in Macports: https://trac.macports.org/ticket/34914 https://trac.macports.org/ticket/33054

For this to be useful, "introspection" needs to be enabled in relevant libraries like Pango.

@samueljohn

This comment has been minimized.

Show comment
Hide comment
@samueljohn

samueljohn Jun 22, 2012

Contributor

Sounds like something we'd like to have. I'll have a try next week and we'll see how difficult that is. Disclaimer: I only used wxPython so far.

Contributor

samueljohn commented Jun 22, 2012

Sounds like something we'd like to have. I'll have a try next week and we'll see how difficult that is. Disclaimer: I only used wxPython so far.

@SimonSapin

This comment has been minimized.

Show comment
Hide comment
@SimonSapin

SimonSapin Jun 23, 2012

Since I opened this ticket PyGObject 3 has been added to MacPorts: https://trac.macports.org/browser/trunk/dports/python/py-gobject3/Portfile

See also the discussion in the related WeasyPrint ticket: http://redmine.kozea.fr/issues/823

I don’t think that wxPython is related in any way to PyGObject.

Since I opened this ticket PyGObject 3 has been added to MacPorts: https://trac.macports.org/browser/trunk/dports/python/py-gobject3/Portfile

See also the discussion in the related WeasyPrint ticket: http://redmine.kozea.fr/issues/823

I don’t think that wxPython is related in any way to PyGObject.

@samueljohn

This comment has been minimized.

Show comment
Hide comment
@samueljohn

samueljohn Jun 23, 2012

Contributor

Thanks. I'll do that.

We cannot tolerate MacPorts to have it and we not :-P

Contributor

samueljohn commented Jun 23, 2012

Thanks. I'll do that.

We cannot tolerate MacPorts to have it and we not :-P

@MikeMcQuaid

This comment has been minimized.

Show comment
Hide comment
@MikeMcQuaid

MikeMcQuaid Jun 23, 2012

Member

To be fair, MacPorts includes too much stuff and that's why a lot of it is broken. Would it be impossible for something like PyGObject to be in pip? That's where I'd expect to find it.

Member

MikeMcQuaid commented Jun 23, 2012

To be fair, MacPorts includes too much stuff and that's why a lot of it is broken. Would it be impossible for something like PyGObject to be in pip? That's where I'd expect to find it.

@SimonSapin

This comment has been minimized.

Show comment
Hide comment
@SimonSapin

SimonSapin Jun 23, 2012

@samueljohn: In that case I will only point out that WeasyPrint itself has been submitted to Macports ;)

@MikeMcQuaid: pip install PyGObject gives something like this on my system:

********************************************************************
* Building PyGObject using distutils is only supported on windows. *
* To build PyGObject in a supported way, read the INSTALL file.    *
********************************************************************

Command python setup.py egg_info failed with error code 1

I’ll leave it to those making Homebrew to decide if WeasyPrint should be included. Once CPython, Pango, PyGObject and pycairo are all there with the right introspection flags, installing WeasyPrint and the rest of its dependencies with pip generally works well.

@samueljohn: In that case I will only point out that WeasyPrint itself has been submitted to Macports ;)

@MikeMcQuaid: pip install PyGObject gives something like this on my system:

********************************************************************
* Building PyGObject using distutils is only supported on windows. *
* To build PyGObject in a supported way, read the INSTALL file.    *
********************************************************************

Command python setup.py egg_info failed with error code 1

I’ll leave it to those making Homebrew to decide if WeasyPrint should be included. Once CPython, Pango, PyGObject and pycairo are all there with the right introspection flags, installing WeasyPrint and the rest of its dependencies with pip generally works well.

@samueljohn

This comment has been minimized.

Show comment
Hide comment
@samueljohn

samueljohn Jun 23, 2012

Contributor

There is a big discussion in the python community going on right now about the "broken" packaging and how to fix it. Pure python modules work well. When there are c dependencies and/or parts of the software in C then it begins to be difficult.

Next week I'll have time to look into PyGObject. I also had the idea to put some python modules/bindings wich have problems with pip into an fork of homebrew (which would be available via the excellent brew tap mechanism.).
I am not an official collaborator of homebrew, so I can only open a pull request and let them decide.

WeasyPrint? Never heard of :-)

Contributor

samueljohn commented Jun 23, 2012

There is a big discussion in the python community going on right now about the "broken" packaging and how to fix it. Pure python modules work well. When there are c dependencies and/or parts of the software in C then it begins to be difficult.

Next week I'll have time to look into PyGObject. I also had the idea to put some python modules/bindings wich have problems with pip into an fork of homebrew (which would be available via the excellent brew tap mechanism.).
I am not an official collaborator of homebrew, so I can only open a pull request and let them decide.

WeasyPrint? Never heard of :-)

@SimonSapin

This comment has been minimized.

Show comment
Hide comment
@SimonSapin

SimonSapin Jun 23, 2012

Yes, there is a lot that could be improved with Python packaging in general. In the meantime, I won’t tell the PyGObject upstream (GNOME) how they should do their packaging :) I wouldn’t say that PyGObject is broken, only it builds with tools other than usual in Python.

WeasyPrint is a new (one year old) Python project that makes PDF from HTML+CSS. You can read more on the website or chat on our mailing list if you’re interested. The dependencies make it non-obvious to install. We (WeasyPrint developers) have heard of a few people who tried and failed on OS X because of PyGObject 3 (hence this request) although none of us use OS X or Homebrew.

Yes, there is a lot that could be improved with Python packaging in general. In the meantime, I won’t tell the PyGObject upstream (GNOME) how they should do their packaging :) I wouldn’t say that PyGObject is broken, only it builds with tools other than usual in Python.

WeasyPrint is a new (one year old) Python project that makes PDF from HTML+CSS. You can read more on the website or chat on our mailing list if you’re interested. The dependencies make it non-obvious to install. We (WeasyPrint developers) have heard of a few people who tried and failed on OS X because of PyGObject 3 (hence this request) although none of us use OS X or Homebrew.

@samueljohn

This comment has been minimized.

Show comment
Hide comment
@samueljohn

samueljohn Jun 23, 2012

Contributor

@SimonSapin WeasyPrint sounds nice. I'll try to make a PyGobject formula since I think this could be the basis for many projects. Wether that will be in the homebrew core or for the time being in my fork of homebrew-alt. (I have not done this yet). But it's a quite easy way to go. When I have done the initial version, perhaps you can have a look, @SimonSapin?

Contributor

samueljohn commented Jun 23, 2012

@SimonSapin WeasyPrint sounds nice. I'll try to make a PyGobject formula since I think this could be the basis for many projects. Wether that will be in the homebrew core or for the time being in my fork of homebrew-alt. (I have not done this yet). But it's a quite easy way to go. When I have done the initial version, perhaps you can have a look, @SimonSapin?

@SimonSapin

This comment has been minimized.

Show comment
Hide comment
@SimonSapin

SimonSapin Jun 23, 2012

@samueljohn do you mean a formula for PyGObject or for WeasyPrint? In any case, I can have a look but I don’t have an OS X system myself to test it. I’ll be sure to tell our two OS X users though :)

@samueljohn do you mean a formula for PyGObject or for WeasyPrint? In any case, I can have a look but I don’t have an OS X system myself to test it. I’ll be sure to tell our two OS X users though :)

@samueljohn

This comment has been minimized.

Show comment
Hide comment
@samueljohn

samueljohn Jun 23, 2012

Contributor

@SimonSapin ok no problem. I think a formula for PyGObject would be good. Is WeasyPrint pure Python? Then I think pip is the way to go. Homebrew can only try to support Python formulas by providing the C dependencies.

Contributor

samueljohn commented Jun 23, 2012

@SimonSapin ok no problem. I think a formula for PyGObject would be good. Is WeasyPrint pure Python? Then I think pip is the way to go. Homebrew can only try to support Python formulas by providing the C dependencies.

@SimonSapin

This comment has been minimized.

Show comment
Hide comment
@SimonSapin

SimonSapin Jun 23, 2012

WeasyPrint itself is currently pure Python. If we add some C or Cython in the future we’ll make sure it builds with distutils/pip.

Note that for PyGObject to be useful to WeasyPrint, we also need introspection enabled in Pango. I just opened another issue for this.

WeasyPrint itself is currently pure Python. If we add some C or Cython in the future we’ll make sure it builds with distutils/pip.

Note that for PyGObject to be useful to WeasyPrint, we also need introspection enabled in Pango. I just opened another issue for this.

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Sep 14, 2012

Contributor

Will review a pull request that provides this software.

Contributor

adamv commented Sep 14, 2012

Will review a pull request that provides this software.

@adamv adamv closed this Sep 14, 2012

@cclauss

This comment has been minimized.

Show comment
Hide comment
@cclauss

cclauss May 25, 2013

Contributor

It is unclear why this issue was closed when you read the original request above.

To me it still seems impossible to use brew to install pygobject 3.x.

Contributor

cclauss commented May 25, 2013

It is unclear why this issue was closed when you read the original request above.

To me it still seems impossible to use brew to install pygobject 3.x.

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv May 25, 2013

Contributor

It was closed because no one submitted a formula for review.

Contributor

adamv commented May 25, 2013

It was closed because no one submitted a formula for review.

@SimonSapin

This comment has been minimized.

Show comment
Hide comment
@SimonSapin

SimonSapin May 25, 2013

In the meantime, WeasyPrint gave up on PyGObject and now uses CFFI instead, which installs with pip. So I’m not personally interested by this anymore.

In the meantime, WeasyPrint gave up on PyGObject and now uses CFFI instead, which installs with pip. So I’m not personally interested by this anymore.

@spaghetti-

This comment has been minimized.

Show comment
Hide comment
@spaghetti-

spaghetti- Feb 1, 2014

@SimonSapin even if you're not interested anymore the issue still persists, PyGObject still fails with pip and does not install with the brew formula either.

@SimonSapin even if you're not interested anymore the issue still persists, PyGObject still fails with pip and does not install with the brew formula either.

@SimonSapin

This comment has been minimized.

Show comment
Hide comment
@SimonSapin

SimonSapin Feb 1, 2014

@spaghetti- feel free to nag PyGObject developers about it :)

@spaghetti- feel free to nag PyGObject developers about it :)

@spaghetti-

This comment has been minimized.

Show comment
Hide comment
@spaghetti-

spaghetti- Feb 1, 2014

@SimonSapin well I'll be on that however I got it to compile by updating the brew formula myself. So as of now I've glib, gobject-introspection and pygobject properly installed. But I still can't import gi from python.

Any idea whats wrong?

@SimonSapin well I'll be on that however I got it to compile by updating the brew formula myself. So as of now I've glib, gobject-introspection and pygobject properly installed. But I still can't import gi from python.

Any idea whats wrong?

@SimonSapin

This comment has been minimized.

Show comment
Hide comment
@SimonSapin

SimonSapin Feb 1, 2014

@spaghetti- I don’t know, and I’m no interested anymore. Sorry. Maybe somebody else can help.

@spaghetti- I don’t know, and I’m no interested anymore. Sorry. Maybe somebody else can help.

@spaghetti-

This comment has been minimized.

Show comment
Hide comment

Alright.

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016

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