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
Recommend to use pip to install pygobject #374
Conversation
Recently, pygobject can be installed from pip. So this PR recommends the user to install pygobject through pip. It also deletes redundant code that handles different operating systems which was sometimes found to be incorrect. Fixes #371
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried this branch, and it didn't work for me - because pygobject couldn't be installed. The first failure was due to pkg-config
not being available; but then it was failing because cairo
apparently wasn't available (although it's definitely installed as a system package).
Assuming you were able to get this to work, there is, at the very least, the need for some extra documentation. Given the numerous failure modes, it also suggests that there is a need for vastly improved error messages. It's not just as simple as pip install pygobject
- because that command won't run out of the box on a stock Ubuntu system.
Sorry I do not understand how these errors happen. Some help would be appreciated.
I agree, do we want to provide an error message with |
I don't know what to tell you other than "on a clean Ubuntu 17.10 install, pip install pyobject didn't complete". I don't use Ubuntu on a daily basis, so I'll need to to defer to someone with more experience to diagnose the cause. |
The official docs say that it is possible to install. Following that exact procedure fails for me also in Ubuntu 17.10.
so I ran
Fedora, CentOS, RHEL, etc.: gobject-introspection-devel pip install finished installing fine after that. I checked out your branch and the Gtk+ tutorials run fine. So while it is great that pygobject is pip installable, the dependencies it needs are not. 😞 |
Some binary dependencies are going to be inevitable. The great nasty symlink hack shouldn't be, though. If we can replace the symlink hack with something that will reliably work with a few "apt-get install" commands, then we should do that. However, adding libgirepository1.0-dev didn't fix the problem for me; I'm still seeing the following errors (partial transcript - there's a lot more than this, but I can't easily copy&paste from a GTK terminal to Mac):
|
It sounds like someone needs to startup some clean Linux vm's and figure out the build dependencies on Ubuntu, Arch, and Fedora. In Ubuntu:
Should install all necessary files. @SanketDG is that something you are interested in testing? |
I tested on Fedora, and it seems like its
|
I could be willing to do this, but it'd take a while before I shell out time for this. |
I found this guide http://pygobject.readthedocs.io/en/latest/getting_started.html, looks like we can use this as a resource with the I have never used Arch, and I can't seem to find a similar |
I setup and tested this on a Ubuntu and Arch Vagrant VM, I'm also trying to get Fedora setup but it is being difficult.
I don't think doing the installation of the build-dep is required. |
IMO, The checks must be present, but the user must be recommended not use system libraries as it may break things on upgrade! On Arch Linux I have the current setup:
|
Ok - on my clean Ubuntu 17.10.1 install, these instructions still aren't working for me. If I install |
@freakboy3742 I'm trying to spin up a fresh 17.10 vm now to see if I can reproduce this. I installed some extra things during my earlier tests in order to build pyenv like build-essentials, so I'll remove all that and use just a normal virtualenv with the system python. |
@freakboy3742 this is what worked for me:
|
I worked to get the PyGObject Development Environment docs updated. |
I get some really weird messages following those instructions. The installation of pycairo and pygobject both seem to fail - or at least, they print errors that make it look like they failed:
But, it looks like the last message is correct, because:
it all seems to work. So - I'm not wild about getting error messages during an install that are false alarms, but this will be less fragile than the symlink approach. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code for this looks good to go (although there's still a bunch of code comments that can be trimmed).
However, there's a whole lot of documentation extra required before this is mergeable. In particular, the fact that the installation process might look like a failure (but is actually a success) is something that needs to be addressed.
We can also add pygobject as an install-requires
dependency of the toga-gtk backend.
Code comments? I removed the majority of stuff.
Sure, what extra stuff do we want to mention? Also can you mention what OS were you using in that weird fail message but successful build? |
@SanketDG I think what @freakboy3742 was referring to for code comments is:
|
@SanketDG We need sufficient instructions that someone with no experience with Toga can get to a working version of the tutorial. So - anywhere that discusses the initial installation process needs to reference the new requirements. There's already sections talking about the dependencies that need to be installed on Linux - we need to make sure those lists have been updated. I was running my tests (and getting the odd error) on Ubuntu 17.10 |
I am getting this too, both on Ubuntu 17.10 and Fedora 27, could it be somehow related to how |
@SanketDG Are you still interested in helping to finish the documentation for how to pip install pygobject? This would be an awesome contribution if we matured this PR to a point where it could be merged. |
Recently, pygobject can be installed from pip. So this PR
recommends the user to install pygobject through pip.
It also deletes redundant code that handles different operating
systems which was sometimes found to be incorrect.
Fixes #371
I am really not sure if I missed any sensitive branches that just needed to be there, I will need some help on that.
PR Checklist: