[Pythonmac-SIG] Why is Framework build of Python needed

2009-05-13 Thread Brian Granger
Hi,

I seem to recall that a Framework build of Python is needed if you
want to do anything with the native Mac GUI.  Is my understanding
correct?  If so, is this requirement documented somewhere?

Thanks!

Brian
___
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Why is Framework build of Python needed

2009-05-13 Thread Bill Janssen
The Mac comes with a Framework build of Python pre-installed (and with
PyObjC pre-installed, which you also need).  Just use /usr/bin/python,
and you'll be fine.

It's the default way that Python builds on a Mac, too.

Bill

Brian Granger  wrote:

> Hi,
> 
> I seem to recall that a Framework build of Python is needed if you
> want to do anything with the native Mac GUI.  Is my understanding
> correct?  If so, is this requirement documented somewhere?
> 
> Thanks!
> 
> Brian
> ___
> Pythonmac-SIG maillist  -  [email protected]
> http://mail.python.org/mailman/listinfo/pythonmac-sig
___
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Why is Framework build of Python needed

2009-05-13 Thread Christopher Barker



Brian Granger  wrote:



I seem to recall that a Framework build of Python is needed if you
want to do anything with the native Mac GUI.  Is my understanding
correct?


Pretty much -- to access the Mac GUI, an app needs to be in a proper Mac 
application bundle. The Framework build supplies that. Technically, the 
use of a framework is independent for this requirement, but using a 
Framework build is the easiest way to satisfy it.


Do you have a reason for not wanting to use a Framework build?

-Chris





--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[email protected]
___
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Why is Framework build of Python needed

2009-05-13 Thread Brian Granger
> Pretty much -- to access the Mac GUI, an app needs to be in a proper Mac
> application bundle. The Framework build supplies that. Technically, the use
> of a framework is independent for this requirement, but using a Framework
> build is the easiest way to satisfy it.

OK.

> Do you have a reason for not wanting to use a Framework build?

Some people I am working with feel that doing a framework build is a
bit of a hassle.  It means they/we have to support custom build logic
on OS X compared to linux/unix, which I agree is a pain.  But there
are no fundamental reasons we are opposed to a Framework build.  Just
a bit more work for us.

Cheers,

Brian
___
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Why is Framework build of Python needed

2009-05-13 Thread Bill Janssen
Christopher Barker  wrote:

> 
> > Brian Granger  wrote:
> 
> >> I seem to recall that a Framework build of Python is needed if you
> >> want to do anything with the native Mac GUI.  Is my understanding
> >> correct?
> 
> Pretty much -- to access the Mac GUI, an app needs to be in a proper
> Mac application bundle.

But there's no pressing reason Python has to supply that bundle.  You
could build your own app using PyObjC to access the Cocoa GUI, using
Python without a Python app bundle.  The two things are logically
separate, aren't they?  You can have a framework build of Python without
having a Python application bundle.

I suspect that the default build of PyObjC assumes that Python is a
framework build, too.  But I don't know if you could build a
non-framework Python and non-framework PyObjC, and use those together to
write Python programs that could access Cocoa.  I suspect you could, but
I also suspect it would be a lot of work.

Bill
___
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Why is Framework build of Python needed

2009-05-13 Thread Ned Deily
In article 
<[email protected]>,
 Brian Granger  wrote:
> > Do you have a reason for not wanting to use a Framework build?
> Some people I am working with feel that doing a framework build is a
> bit of a hassle.  It means they/we have to support custom build logic
> on OS X compared to linux/unix, which I agree is a pain.  But there
> are no fundamental reasons we are opposed to a Framework build.  Just
> a bit more work for us.

FWIW, if you are building and installing python modules and/or C 
extensions, distutils or setuptools should generally be able to 
transparently handle the framework-specific details for you.

-- 
 Ned Deily,
 [email protected]

___
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Why is Framework build of Python needed

2009-05-13 Thread Ned Deily
In article <[email protected]>, Bill Janssen  
wrote:
> I suspect that the default build of PyObjC assumes that Python is a
> framework build, too.  But I don't know if you could build a
> non-framework Python and non-framework PyObjC, and use those together to
> write Python programs that could access Cocoa.  I suspect you could, but
> I also suspect it would be a lot of work.

FWIW, fink uses a "unix shared" library build rather than a framework 
build for its pythons (at least the 2.5 version I have) and has PyObjC 
packages for them.  I haven't tried to install them and have no idea how 
well they work.

-- 
 Ned Deily,
 [email protected]

___
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Why is Framework build of Python needed

2009-05-13 Thread Bill Janssen
I think this depends on what you think the "native Mac GUI" is, and what
you want to do with it.  For instance, a non-framework build, combined
with Xlib (http://python-xlib.sourceforge.net/) works quite well with
the Apple X11 server, which in turn uses the native Mac GUI.

Bill

Brian Granger  wrote:

> Hi,
> 
> I seem to recall that a Framework build of Python is needed if you
> want to do anything with the native Mac GUI.  Is my understanding
> correct?  If so, is this requirement documented somewhere?
> 
> Thanks!
> 
> Brian
> ___
> Pythonmac-SIG maillist  -  [email protected]
> http://mail.python.org/mailman/listinfo/pythonmac-sig
___
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig