PDA

View Full Version : Apple dev - help needed (python)


DiskDoctor
12-07-2009, 10:26 AM
Hello,

As I prepare to finish the Apple port of my app, written entirely in python, I realized today that my system (10.4 "Tiger") lacks some crucial library - libpython2.6.dylib. This is because of the system's version - the said library isn't included in the distribution CD because it wasn't available at that time.

I find it crucial since it is needed to build a standalone app (by py2app extension).

So my question is: where and how can I get the said library? My system runs on PPC Mac. I'd be grateful really, that's stopping me now. I either get the library somehow or downgrade from python2.6 to 2.4 or 2.3 (which would cost me hell lot of time due to application features' loss and other library dependencies).

I ship beer worldwide :-)

nOw2
12-07-2009, 10:34 AM
You should tell py2app to link to your Python 2.6 install rather than the system 2.5/2.4 install. Also ensure it is creating a complete bundle (i.e. embeds your preferred python in the final distribution).

I couldn't say how you do that, sorry (though my day-job is developing financial apps on MacOS which are deployed on Linux).

I ran into a similar issue with py2exe on Windows.

SamuraiCrow
12-07-2009, 12:12 PM
The version of Python that comes with MacOS X is not compatible with most of the extensions that are designed to work with standard Python. The solutuion is to install the standard Python library along with your application.

DiskDoctor
12-07-2009, 02:12 PM
You both seem not getting it! MacOS Tiger delivers Python2.2, 2.3 and possibly 2.4 only. My code is designed to work with python2.6.

I installed py26 from source but despite that I do not have the said dynlib version on my system. Hence I search the way to get it (the file!)

nOw2
12-07-2009, 03:16 PM
If you build from source you need to include the --enabled-shared configuration option which builds non-static python binaries and puts python in the library mentioned.

DiskDoctor
12-08-2009, 03:30 AM
If you build from source you need to include the --enabled-shared configuration option which builds non-static python binaries and puts python in the library mentioned.

You mean as a parameter to ./configure or with make install? At which step?

MastaTabs
12-08-2009, 05:33 AM
configure

DiskDoctor
12-13-2009, 09:48 AM
If you build from source you need to include the --enabled-shared configuration option which builds non-static python binaries and puts python in the library mentioned.

I did what you'd said. I got my binary finally!!!

Of course I encountered other cute issues like "Bus Error" on my way. But it's done already.

Please PM me your whereabouts, I'll try to send you a decent local beer around Xmas.

@thread
Thanks for help! You all saved my life.