So, I know very little about Python, or even software development at all. But there’s one Open Source project that I’m interested in, that is distributed as windows binaries only. I tried downloading the source and running it, solving dependencies as I went, and I managed to start it, though that’s still very far from solving all the issues with it.
I wanted to ask if anyone here has any experience on packaging python on the Mac so it can be installed and run by “end users”, and could point me in the right direction.
I’ve done a bit of python programming. I think the problem with cross platform is that many of the frameworks that one would use in python (especially for graphics) seem to depend on compiled C code. Getting some graphing python libraries working on my Mac was a multi-day process of compiling, finding missing dependencies, and screaming.
Supposedly, “python eggs” are part of the solution, as they’re supposed to hook one up to a central repository, where you can get all of those nasty dependencies over the internet when you download some main program, and install looks simple enough that one could probably wrap it with a generic installer. This seems to work well if all of your dependencies reside on that magic centralized server, or you can redistribute them yourself, but otherwise you’re screwed.
I find this far more difficult than a language like java, which is mostly write once, run anywhere (and graphics bits and bobs and handled by the VM and are standard.)
This probably isn’t the answer that you’re looking for…:(
I haven’t used it myself, but Xcode has a “Build Applet” tool that’s supposed to make a standard OS X app out of a Python script. Taking care of dependencies like the widget library used (wxPython, apparently) may still be outside its scope, though.
Except when the stupid hairy clams compile their java app into a PE EXE, the bastards. I’ve had that happen many times, and the “programmers” didn’t understand why this was a problem. “But it’s java! Therefore it is cross-platform!”
Anyway, EoPK seems like it includes a bunch of DLLs. The developers are Win-centric, so I’m not sure I even want to touch this.
Running it makes X11 start, but nothing else. Dunno why wxWidgets would require that, as I’ve installed my own version of wxWidgets 2.8.9 for development purposes, natively targetted. Best to ask the devs what the hell they’re doing :)
I took a look at the EoPK package, and I think the DLLs might just be accidentally included from the Windows binary distribution. At least I didn’t see anything in the source code that would depend on them.
py2app (http://undefined.org/python/#py2app) is standard way of packaging Python application into standalone .apps for Mac after you have all the dependencies installed, but I can’t really offer any detailed help on how to use it. My experiences are that any development stuff that doesn’t involve XCode is a huge pain in the ass on MacOSX.
yeah. those were the deps I had to resolve when trying to run it. Weirdly, when I did, I still couldn’t play it as expected, I guess because of some difference of behaviour that confuses the interpreter. The graphics didn’t update when they should, etc.
So I guess that it won’t be worth a lot to try cramming it into py2app anyway, but thanks for linking that, now I know what I should use.