Re: [Pythonmac-SIG] Python development on OSX

2011-01-19 Thread Charles Hartman
On Wed, Jan 19, 2011 at 2:10 PM, Christopher Barker 
 wrote:

>
>
> Do I need/want to use py2app to distribute my app(s)?
>>>
>>
>> Never happens.
>>
>
> fair enough.
>


But this is where Bill J's use-case departs drastically from those of many
users, perhaps most, and certainly the majority of those who need any help.

If you think of Python as yet another handy scripting language, easier to
use than Perl, etc., then you don't care about making apps -- and 60% of the
questions that come to this site are irrelevant, because you're somebody who
already lives inside Darwin/Unix/whatever.

But there are a lot of people who do programming just in order to make user
applications, not to tweak systems from half-inside.  Many of them want to
make cross-platform programs (which scripting geeks never do).  Many of them
-- me for a ready example -- know barely enough about bash to get things
installed properly.  More to the point: *all* of them, if they want to use
Python (because they're sensible people) on the Mac (because they're
sensible people) need to use py2app.

Despite what's sometimes implied here, py2app is not a frill.  From my point
of view, it's essential to the Python community on Mac  -- perhaps a
minority point of view, but representing a minority that I suggest is
crucial to the future of Python and the Mac.


~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~

Charles O. Hartman
Poet in Residence
Professor, Chair, Department of Literatures in English
oak.conncoll.edu/cohar
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Python development on OSX

2011-01-19 Thread Aahz
On Wed, Jan 19, 2011, Christopher Barker wrote:
>
> OK -- well, I'd say the solution to that is simple: DON'T DO THAT.
> We say time and time again that you should NEVER mess with Apple's
> python.

Just to repeat for emphasis: NEVER mess with ANYONE'S system python.
Doesn't matter whether it's Mac, Windows (yes, some Windows machines
ship with a system Python for internal utilities), or Linux.  If you
don't like the system Python, your Python should be installed somewhere
else, with your PATH (and/or aliases) adjusted to grab it.
-- 
Aahz (a...@pythoncraft.com)   <*> http://www.pythoncraft.com/

"The volume of a pizza of thickness 'a' and radius 'z' is
given by pi*z*z*a"
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Python development on OSX

2011-01-19 Thread Christopher Barker

NOTE:

I'm not trying to persuade Bill of anything -- he's clearly found a 
method that works well for him, but for future googlers, I think a few 
clarifications are in order:


On 1/18/11 4:29 PM, Bill Janssen wrote:

Bill -- I'm really curious what issues you've had --



In general, there are issues around site-packages, paths, and other such
things.  I don't think you and I necessarily have much trouble with it,
but I tend to help others with Python on Macs, and they seem to get into
all kinds of trouble.  The best one I've found is one group who had
decided to upgrade their Leopard Python to 2.6.  They'd installed the
python.org Python, removed the symlink /usr/bin/python, and re-linked
/usr/bin/python to the 2.6 version.  They were happy, but plagued by odd
problems with their machines that didn't (to them) seem to be
Python-related.


OK -- well, I'd say the solution to that is simple: DON'T DO THAT. We 
say time and time again that you should NEVER mess with Apple's python.


So there problem was not that they installed another python, but that 
they broke Apple's. And there is no need -- they got too smart for their 
own good. The python.org installer changes the users PATH anyway. 
(granted, not for all users, but if you have a multi user system, you'll 
need to know how to manage PATHs anyway -- and /usr/local should be on 
everyone's PATH)



Another problem I've run into more than once was that the user had
installed different incompatible versions of an extension, and couldn't
see why an application (with an embedded Python interpreter) was
misbehaving -- it was getting the wrong version of the extension.


Well, Even Apple supplies more than one version these days -- if you are 
embedding Python, you're going to need to know what you are doing.



Not sure this is much use to anyone, but here's my decision tree, which
has worked well for me over the past 7 years:


1) Do I do a bunch of unix-y command line stuff in general, and not
want to develop OS-X GUIs?


if yes -- use system Python.


well, I meant a bunch of unix-y stuff in addition to Python -- stuff 
that Apple doesn't give you -- I use MacPorts for a bunch of 
command-line scientific tools, and it would make some sense to use 
macports python for those things, too (dependencies and all).


But yes, if you are doing command line stuff and don't need anything 
Apples doesn't give you -- the Apple python is fine (unless you need a 
newer version)



if no:


Do I need/want a newer version than Apple provides?


if yes: build non-framework version from source.


I can hardly see this as easier/more reliable than installing the 
python.org build -- if you build from source and overwrite 
/usr/bin/python, you'll sure get the same problems! And anyone that can 
build from source understand PATHs, etc, enough not to screw things up!



Do I need/want to use py2app to distribute my app(s)?


Never happens.


fair enough.


Do I want to use pre-build binaries of common hard-to-build packages?

if yes: cry about the general unfairness of the world, then build them
from source instead to work with the system Python.


Why cry when wxPython, PIL, SciPy, Matplotlib, ??? are available as 
nifty easy to use installers?


There really aren't very many people for whom "build it from source" is 
the best option.



Final NOTE: It's great that Bill takes this approach -- he's gotten 
things working and helped others a lot -- someone's got to build from 
source! Thanks, Bill!


-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

chris.bar...@noaa.gov
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Python development on OSX

2011-01-19 Thread Andrew Jaffe

On 17/01/2011 22:41, Tony Cappellini wrote:

I do want 2.7 because it's a requirement at work.
I want to have the same versions & packages to avoid compatibility issues.

I can put Python2.7 in a different directory and leave 2.6 there but I
want the 2.7 installation
to be the default one.



For the purposes you actually mean, the python.org install does become 
the default one -- you can install it so that it comes earlier on your 
path (and I believe even this step is automated). In this case, all 
packages installed at the command line (or by binary installers) are in 
place for this build. I have not found an advantage to the fink or 
macports installs in the last few versions of Python versions.


But it's crucial to leave the Apple-installed build exactly where it is, 
as it is used by the system.


Andrew


___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG