Amiga.org

Operating System Specific Discussions => Other Operating Systems => Topic started by: DiskDoctor on December 07, 2009, 05:26:11 PM

Title: Apple dev - help needed (python)
Post by: DiskDoctor on December 07, 2009, 05:26:11 PM
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 :-)
Title: Re: Apple dev - help needed (python)
Post by: nOw2 on December 07, 2009, 05:34:21 PM
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.
Title: Re: Apple dev - help needed (python)
Post by: SamuraiCrow on December 07, 2009, 07:12:52 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.
Title: Re: Apple dev - help needed (python)
Post by: DiskDoctor on December 07, 2009, 09:12:45 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!)
Title: Re: Apple dev - help needed (python)
Post by: nOw2 on December 07, 2009, 10:16:02 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.
Title: Re: Apple dev - help needed (python)
Post by: DiskDoctor on December 08, 2009, 10:30:59 AM
Quote from: nOw2;533006
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?
Title: Re: Apple dev - help needed (python)
Post by: MastaTabs on December 08, 2009, 12:33:07 PM
configure
Title: Re: Apple dev - help needed (python)
Post by: DiskDoctor on December 13, 2009, 04:48:54 PM
Quote from: nOw2;533006
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.