How do I develop and create a self-contained PyGTK application bundle for MacOS, with native-looking widgets?

I have read that it is possible to build GTK+ on MacOS X. I know that it's possible to create a bundle of a GTK+ application on MacOS. I also know that it's possible to create widgets that look sort of native. However, searching around I am not really clear on how to create a bundle that includes the native theme stuff, and uses Python rather than its own C main-point. There are also rumors that it's possible to build PyGTK, but it sounds like there might still be some wrinkles in that process.

However, there is no step-by-step guide that explains how one can set up an environment where an application might be run from Python source, then built and deployed in an app bundle. How can I go about doing that?


Asked by: Lenny502 | Posted: 24-09-2021






Answer 1

Native looking widgets is quite complicated. There's a beginning of quartz engine (for theming) found here http://git.gnome.org/browse/gtk+/tree/gdk/quartz For self-contained applications check out the newly released bundle on http://live.gnome.org/GTK%2B/OSX

Answered by: Robert126 | Posted: 25-10-2021



Answer 2

I'm not sure if I'm grokking all the details of your question, but looking at your problem in general (how do I deploy a python app on mac), I'm inclined to say that the answer is py2app. Basically this will bundle a python interpreter and all relevant python files for you, and give you a scriptable system that you can use to add in whatever other resources/dependencies you need.

Answered by: Carlos250 | Posted: 25-10-2021



Answer 3

While it's not a guide solely targetted at python/GTK+/OS X, this post is a good, detailed description of someone else's attempt to do most of what you describe. Obviously, the app-specific stuff is going to vary.

Answered by: Daisy168 | Posted: 25-10-2021



Similar questions

windows - Creating self-contained python applications

I'm trying to create a self-contained version of pisa (html to pdf converter, latest version), but I can't succeed due to several errors. I've tried py2exe, bb-freeze and cxfreeze. This has to be in windows, which makes my life a bit harder. I remembe...


python - Looking for a self-contained equation rendering library

Closed. This question does not meet Stack Overflow guid...


python - Self-contained egg installs: turbogears and pythonpath

I have a TG 1.0 application (not 1.1 -- I'm not sure I can convince the admin to upgrade) running. I have my own checkout of the project from cvs that I'm developing with, and it's come time to integrate xlwt (http://www.python-excel.org/) into the web app. However, I don't have administrator access and it's not easy to get python packages instal...


windows - Self-contained python installation with executable tools included (pip, orbited, etc)

I'm trying deploy a Python application on Windows as a folder that includes a full python 2.6 folder. I don't need/want a fancy solution like py2exe, I'm just trying to automate deployment of a web application. So long as I include python26.dll and set the PYTHONHOME correctly, things seem to work if I just include the Python26 folder in its entirety. However a number of the Python26/Script files don't work. For i...


python - multiple self-contained filters applied during a single iteration

Lets say I have a data structure that's very expensive to iterate through and I need to collect it's elements into lists depending on certain criteria. #fake data. pretend it's hard to access import random slowStruct = range(30) random.shuffle(slowStruct) def check1(x): return x < 3 def check2(x): return x > 15 def check3(x): return x < 25 and x > 20 The easiest...


How do I make a Python script along with its modules self-contained?

programming novice here with a development management question. I'm writing a very simple Python script in Windows 7 that will be copied into a directory of Excel files sort it all by filename, exclude the scriptfile in the directory, and process them in order. I've installed both Python 2.7 and 3.4 on my system which resides in C:\Python27 and C:\Python34 respectively. I've written the sorting par...


web scraping - A web crawler in a self-contained python file

I have found lots of Scrapy tutorials (such as this good tutorial) that all need the steps listed below. The result is a project, with lots of files (project.cfg + some .py files + a specific folder structure). How to make the steps (listed below) work as...


windows - Self-contained python application with GUI and charts

I have some data in an SQLite database and serve it through JSON objects to an HTML app via AJAX calls and chart it using D3.js. I would like to replicate the same functionality locally (MS Windows is fine) in a self-contained application. It would be a super simple app, just a few form controls, a chart and a table, querying a local file-based database. As for it being self-contained - I'd like to ship an .exe fi...


sys.path - Installing python into a portable, self-contained directory on the network

I need to install python 2.7 and 3.4 for linux/unix (built from source) into a directory on the network other than the location from which it will ultimately be used. I.e. the directory containing the installation must be portable and self-contained. Thus, it seems like things such as the "installation-dependent default" sys.path should be defined relative to the current location of the python installatio...


pip - Is it possible to create a fully self-contained Python package?

The question Ansible is a python moduel, installable via pip. It relies on several dependencies, also pip modules. Is it possible to "roll up" all of those dependencies and Ansible itself into some sort of a single package, that can be installed offline, without root? It's highly preferable to not need pip for the install, although it will be available for package creation. Extra background I'm ...






Still can't find your answer? Check out these communities...



PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python



top