Welcome, Guest. Please login or register.

Author Topic: Apple dev - help needed (python)  (Read 1830 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline DiskDoctorTopic starter

  • Sr. Member
  • ****
  • Join Date: Jan 2009
  • Posts: 308
    • Show only replies by DiskDoctor
Apple dev - help needed (python)
« 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 :-)
Was: Mac Mini PPC running MorphOS 2.4
Now: Amiga Forever 2010 with AmiKit and AmigaSYS
Not used: Icaros Desktop 1.2 (reason: no wifi)
Planned soon: an OS4 system
Shortly then: a MOS notebook (wifi is a must-have)
 

Offline nOw2

  • Full Member
  • ***
  • Join Date: Jul 2002
  • Posts: 194
    • Show only replies by nOw2
Re: Apple dev - help needed (python)
« Reply #1 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.
 

Offline SamuraiCrow

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2280
  • Country: us
  • Gender: Male
    • Show only replies by SamuraiCrow
Re: Apple dev - help needed (python)
« Reply #2 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.
 

Offline DiskDoctorTopic starter

  • Sr. Member
  • ****
  • Join Date: Jan 2009
  • Posts: 308
    • Show only replies by DiskDoctor
Re: Apple dev - help needed (python)
« Reply #3 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!)
Was: Mac Mini PPC running MorphOS 2.4
Now: Amiga Forever 2010 with AmiKit and AmigaSYS
Not used: Icaros Desktop 1.2 (reason: no wifi)
Planned soon: an OS4 system
Shortly then: a MOS notebook (wifi is a must-have)
 

Offline nOw2

  • Full Member
  • ***
  • Join Date: Jul 2002
  • Posts: 194
    • Show only replies by nOw2
Re: Apple dev - help needed (python)
« Reply #4 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.
 

Offline DiskDoctorTopic starter

  • Sr. Member
  • ****
  • Join Date: Jan 2009
  • Posts: 308
    • Show only replies by DiskDoctor
Re: Apple dev - help needed (python)
« Reply #5 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?
Was: Mac Mini PPC running MorphOS 2.4
Now: Amiga Forever 2010 with AmiKit and AmigaSYS
Not used: Icaros Desktop 1.2 (reason: no wifi)
Planned soon: an OS4 system
Shortly then: a MOS notebook (wifi is a must-have)
 

Offline MastaTabs

  • Jr. Member
  • **
  • Join Date: Dec 2005
  • Posts: 75
    • Show only replies by MastaTabs
    • http://www.sophisticated-development.de/
Re: Apple dev - help needed (python)
« Reply #6 on: December 08, 2009, 12:33:07 PM »
configure

Offline DiskDoctorTopic starter

  • Sr. Member
  • ****
  • Join Date: Jan 2009
  • Posts: 308
    • Show only replies by DiskDoctor
Re: Apple dev - help needed (python)
« Reply #7 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.
Was: Mac Mini PPC running MorphOS 2.4
Now: Amiga Forever 2010 with AmiKit and AmigaSYS
Not used: Icaros Desktop 1.2 (reason: no wifi)
Planned soon: an OS4 system
Shortly then: a MOS notebook (wifi is a must-have)