Skip to content
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

Please elaborate docs for ms-windows users #142

Open
guettli opened this issue Aug 10, 2018 · 9 comments
Open

Please elaborate docs for ms-windows users #142

guettli opened this issue Aug 10, 2018 · 9 comments

Comments

@guettli
Copy link

guettli commented Aug 10, 2018

Please elaborate the docs, and tell us how to install if you use ms-windows:

https://python-gtk-3-tutorial.readthedocs.io/en/latest/install.html

Thank you very much.

@TingPing
Copy link
Contributor

Options being:

@guettli
Copy link
Author

guettli commented Aug 13, 2018

@TingPing You mentioned two tools. Both seem to do some C/C++ compiling. I ask myself if this is needed. Is there no way to do python+gtk development without compiling?

On linux I don't need to do compiling to do develop a simple tool with python and gtk.

Is there no way to just download the binary gtk-libray?

@TingPing
Copy link
Contributor

msys2 doesn't require compiling anything, but if you want to use msvc python (upstream python) then sadly yes you have to build it for now. They want to get binary releases out there but it just hasn't happened yet.

@guettli
Copy link
Author

guettli commented Aug 13, 2018

I have notopinion (msys2 vs upstream python) up to now. I would like to follow the sane default way which is done by most other developers. Is this msys2? I love it, if maintainers say "If unsure do x".

@TingPing
Copy link
Contributor

The number of pygobject applications shipping installers on Windows is probably quite small, I don't think there is a "default" way.

The gvsbuild way is much more work but means you get to use python.org's installer. I like that.

The msys2 way is easier.

Pick your poison I guess.

@guettli
Copy link
Author

guettli commented Aug 14, 2018

I am unsure if I understood that correctly. You said:

The number of pygobject applications shipping installers on Windows is probably quite small

My goal is to write a simple gtk based programm which does get installed via an msi file. With cx_freeze I am able to create a msi file with bdist_msi.

This means I don't want the user to install Python first. The msi should contain all that is needed.

I would like to take the easy way. What is simpler?

python2 vs python3?

gtk2, pygobject ...?

I have no clue.

@TingPing
Copy link
Contributor

pygtk (gtk2) is extremely dead and Python 2 only has a bit more than a year of support left.

@FriendFX
Copy link

FriendFX commented Jul 4, 2019

I also wished the docs were a little more specific/complete for Windows users. What I've learned so far (please correct any mistakes, this should be seen as a first rough draft as I don't have much experience in this area):

  • The MSYS2 way
    • You don't have to compile anything
    • You have to use MSYS2's own packaged version of Python for development, which is different from any Python you may have installed natively on Windows
    • You have to use MSYS2's own packaged version of PyGObject and dependencies
    • To distribute your program, besides MSYS2's PyGObject libraries, you have to package parts of MSYS2 with it (?)
  • The gvsbuild way
    • You have to compile PyGObject and dependencies, unless you're happy with an old version still available on SourceForce
    • You can use the native Windows Python installation for development
    • To distribute your program, you can ship it with the native PyGObject libraries (no additional libs required) (?)
  • The pip way (pip install PyGObject)
    • Basically the same as gvsbuild, but managed by pip which will (try) to do the fetching of sources & building for you. This failed for me (cairo.h was missing, didn't try too hard to work around it)

@guettli
Copy link
Author

guettli commented Jul 4, 2019

Just for the records, I switched to PySide. After the switch the task got completed very soon. And now I am happy that I don't need to do any native GUI stuff any more. Related: https://github.com/guettli/programming-guidelines/blob/master/README.rst#avoid-writing-a-native-gui

But I leave this issue open, since other people seem to have the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants