Re: [Pythonmac-SIG] MacPython & Leopard: Which 'site-packages' folder to use?

2008-06-26 Thread Python Nutter
I take my system to the next level.

I work with the Framework/Reference Python from python.org so I use
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages

However before I had my site-packages folder inundated with installed
modules I installed only Peak Setup Tools and VirtualEnv and because I
like iPython I installed that.

Then using Doug Hellmens wrapper (needed slight modification to the
installation instructions to make it work when moving from a Linux
system to installing it on a Mac OS X system) I have a system where I
can created unlimited "sandoxed" python sessions (projects) each with
their own ability to easy_install or setup.py install any number of
python modules and have them not step on any other virtual python
session (project).

now a simple
$mkvirtualenv WhateverProjectName

will create the folders, partial symlinks into system python, and
automatically install setuptools into my new project's folder and then
switch me into that virtualenv right away

(WhateverProjectname)$_

where I can then easy_install the specific python modules I need just
for that project.

If I want to switch over and work on that new pyglet game I have been
developing a simple

(WhateverProjectname)$workon MyPygletGameProject
(MyPygletGameProject)$_

gets me out of my sandboxed Project and into my sanboxed PygletGameProject.

Very slick, only way to go.


Mac OS X modifications:

Just edit.bash_profile (OS X) instead of .bashrc (Linux, etc.)

Make a directory in your home folder called .virtualenvs to hold all
your projects you created

$mkdir .virtualenvs

Then store your virtualenvwrapper_bashrc in some directory, I use
Scripts folder with a bash folder in it, all inside my home folder.

Then edit your .bash_profile and add:

# Setting VirtualEnv and VirtualEnvWrapper for Python
export WORK_HOME=$HOME/.virtualenvs
source $HOME/Scripts/bash/virtualenvwrapper_bashrc


And you too can join in on the fun =)

Cheers,
Python Nutter

On 27/06/2008, Larry Meyn <[EMAIL PROTECTED]> wrote:
>
>
>
> On 6/26/08 12:10 PM, "Russell E. Owen" <[EMAIL PROTECTED]> wrote:
>
>> In article
>> <[EMAIL PROTECTED]>,
>>  "Rob Gabaree" <[EMAIL PROTECTED]> wrote:
>>
>>> Hello,
>>>
>>> With Leopard's built-in Python, user-installed modules are placed in
>>> /Library/Python/2.5/site-packages/.
>>>
>>> If I'm using MacPython, should I avoid putting anything into this
>>> directory and use
>>> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
>>> instead?
>>>
>>> I'd just like to double check. I noticed the former path wasn't in
>>> sys.path when I looked, but I wasn't sure if it was accidentally left
>>> out by mistake.
>>>
>>> Thanks for the help,
>>
>> If you are using MacPython then use
>> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pack
>> ages.
>>
>> The two pythons do not share installed packages. This is probably good;
>> you avoid endangering the system python and you can upgrade to python
>> 2.6 or 3.0 when you are ready without installing packages that are
>> incompatible with the system python.
>>
>> -- Russell
>>
>
> Additional Info:
> While you can use the system python and install modules in
> /Library/Python/2.5/site-packages/, you cannot install new versions of the
> pre-installed modules that are stored in
> /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/
> (You can install new versions, but the system python checks its own folder
> first.)  Several modules such as numpy and wxPython are in the system
> python's extras library.  Since I like to update these from time to time,
> I've abandoned the system python and use a framework install instead.  One
> drawback to a user-installed python is that you lose access to some
> system-python only modules like CoreGraphics.
>
> --Larry
>
> ___
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] "Best" Mac Python under Leopard?

2008-08-21 Thread Python Nutter
If you go the ports route, download and install Porticus (highly
recommended) to give you graphical management of the ports packages,
to clean, download, install, activate/deactivate, handle dependencies,
show you all variations of a particular port and just checkmark all
the optional compiles you want to build.

I went for the Python.org framework over Apple's framework because it
was a simple install without worrying about ports. The only problem
you may encounter is if you start doing game programming with Pygame,
etc. While this may not be a worry because for years Pygame.org never
had any up-to-date current OS X binaries. However, they just released
the latest version for OS X and if you use the Python.org framework
you will have to install PyObjC 1.4 (on their download page) to make
it work with Leopard. Other than that I've found no headaches or
worries by going with the Python.org framework install.

Other things I added to my framework install to make life easier was
iPython, virtualenv (and virtualenvwrapper from the python magazine
article) which will also make use of the PEAK easy install setup tool.
If it was not for these last few tools working together I would
probably have gone full hog into the port route of making sure I got
the most up-to-date files. With them its more like an apt management
system in Debian/Ubuntu systems for binaries/eggs instead of ports and
the whole compilation process.

Whichever you choose, bets of luck.
Cheers,
PN

2008/8/22 Chris Fonnesbeck <[EMAIL PROTECTED]>:
> Andrew Jaffe  gmail.com> writes:
>
>>
>> Hi All,
>>
>> Thanks for the advice!
>>
>> However, I'm pretty sure I don't need the overhead of a fink or MacPorts
>> install -- I've been very happy with Framwork installs so  far (and I'm
>> pretty sure that's necessary for PyObjC).
>>
> I can vouch for the new Enthought Python:
>
> http://www.enthought.com/products/epddownload.php
>
> It comes with a variety of scientific programming packages, and uses egg
> packages, so it is very easy to maintain and update.
>
>
>
>
> ___
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Python 3 Update?

2009-02-15 Thread Python Nutter
It is bigger than any other package to download so that increases the
probability it might be universal with multiple CPU type binaries in
the one package.

2009/2/16 Chris Rebert :
> On Sun, Feb 15, 2009 at 6:50 PM, Scott Clausen  wrote:
>> Hello,
>>
>> I'm new to the list and was wondering if Mac's can upgrade to Python v3.
>
> http://python.org/ftp/python/3.0.1/python-3.0.1-macosx2009-02-14.dmg
>
> Dunno whether it's Universal.
>
> Cheers,
> Chris
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] Python program done, now need to Change Rocketship Icon, Remove Python menu?

2009-06-29 Thread Python Nutter
I've completed a GUI program in Python and used wxPython for a cross
platform GUI solution.

Now I need to focus on polishing up the Mac OS X distribution side of things.

I've scanned my email program's archives of pythonmac-sig and I didn't
get any results on a few first items I need to learn.

The Mac Python Framework launches GUI based applications using Python
Launcher, which gives a Rocketship icon on the Dock and inserts a
Python menu on the Mac menubar.

1. I wish to override the Rocketship icon and display an icon
representing my Application.

2. I wish to override/remove the Python menu item on the toolbar so
that only my wxPython menus appear on the Mac toolbar when my program
has focus.

3. I don't suppose there is an easy way to make an application folder
in the Mac OS X Application folder representing my python program with
the same Icon that would appear on the Dock when the user launches my
program? I don't see any easy references to the folder structure for
Python programmers to deploy on the OS X platform. Is there any good
resources out there that will teach how to do this?

I noticed that there is a "Build Applet" program on the Mac, and it
prompts to select Source or Python file. However all the .py files are
grayed out when I browse any directory on my USB Drive. I had small
hopes it would help build the folder structure mentioned in Item#3 so
I could then learn how to build a DMG file that will let a user drag
the Icon/folder representing my program into the Applications folder
to install it.

What are some good resources to learn how to deploy on this platform?

Cheers,
PN
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig