Re: [PyQt] question about installation best practices on OS X

2009-10-20 Thread Darren Dale
On Tue, Oct 20, 2009 at 10:02 AM, Darren Dale dsdal...@gmail.com wrote:
 On Mon, Oct 19, 2009 at 9:50 PM, William Kyngesburye
 wokl...@kyngchaos.com wrote:
 Hmm, Macports.  It's great for those who want a familiar packagae-manager
 setup or just don't want to get their fingers dirty compiling source.

 I'm quite comfortable compiling from source. The value I find in a
 package manager is 1) keeping up with software upgrades and 2) making
 it easier for people who use my own software to get up and running,
 many of whom think it is unreasonable to download and install 10
 prerequisites to do so.

 It
 adds itself to your PATH and can cause trouble for non-Macports builds
 (getting wrong versions of tools in the system, like GNU vs. BSD versions,
 wrong libs linked).  I don't mean to start a debate over it, just pointing
 out that you might want to look at trying to do things the Mac way first,
 like installers where available.

 Python does have up-to-date installers for a more Mac-standard Python
 framework install.

 I appreciate the comment, and decided to not use a package manager for
 the time being and try to get comfortable with the Mac way.

 Following up on my original post, I installed python-2.6.3 using the
 installer at python.org, which installed into /Library/Frameworks/ and
 automatically prepended
 /Library/Frameworks/Python.framework/Versions/2.6/bin to my path in
 ~/.profile. With this configuration, when I install PyQt4, pyuic4 etc
 end up on the path. There was no need for passing additional arguments
 to configure.py.

 I found some other issues related to using the system python
 (/Library/Python/2.6/site-packages appearing late in PYTHONPATH, so
 system-provided packages like numpy-1.2.1 are favored over manually
 installed packages like numpy-1.3), so it looks like it is a good idea
 to not use the system python.

I don't want to turn this into a forum to air general mac issues, but
I have to qualify that last remark. The mac installers distributed by
python.org do not appear to support a 64 bit environment. So I am back
to using the system python.

Darren

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] question about installation best practices on OS X

2009-10-20 Thread William Kyngesburye

On Oct 20, 2009, at 11:05 AM, Darren Dale wrote:


I found some other issues related to using the system python
(/Library/Python/2.6/site-packages appearing late in PYTHONPATH, so
system-provided packages like numpy-1.2.1 are favored over manually
installed packages like numpy-1.3), so it looks like it is a good  
idea

to not use the system python.


I don't want to turn this into a forum to air general mac issues, but
I have to qualify that last remark. The mac installers distributed by
python.org do not appear to support a 64 bit environment. So I am back
to using the system python.

One thing you can do to get custom builds to override system builds  
(like numpy) is create a separate site-packages (let's say /Library/ 
Python/2.6/site-overrides for example) for these and add a pth file  
to the default site-packages like:


import sys; sys.path.insert(0,'/Library/Python/2.6/site-overrides')

This makes sure that the site-overrides is before the system paths.   
Some packages already do something similar (easyinstall-based,  
wxpython).


I do something similar for some frameworks I build (GDAL, SQLite) that  
also have python modules.  I put the python modules inside my  
framework and add an insert-pth file to site-packages pointing to my  
framework.


-
William Kyngesburye kyngchaos*at*kyngchaos*dot*com
http://www.kyngchaos.com/

Earth: Mostly harmless

- revised entry in the HitchHiker's Guide to the Galaxy


___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] question about installation best practices on OS X

2009-10-19 Thread Darren Dale
Excellent, thank you for the pointer.

May I request a feature? Could this be mentioned somewhere in the mac
README? Or would it be possible to add some logic to the mac
installation scripts to find where distutils installs packages by
default?

Darren

On Sun, Oct 18, 2009 at 11:04 PM, William Kyngesburye
wokl...@kyngchaos.com wrote:
 By default (as you've noticed), SIP and PyQt install their binary
 executables in the framework.  This is fine for the python.org Python, but
 installing in the system frameworks is not quite proper.

 What I do for SIP and PyQt and the system python is specify a custom bin
 (and site-packages and other files) location in configuration:

 SIP:

 python configure.py -n -d /Library/Python/2.6/site-packages -b
 /usr/local/bin -e /usr/local/include -v /usr/local/share/sip --arch=i386 -s
 MacOSX10.6.sdk

 PyQt:

 export QTDIR=/Developer/Applications/Qt
 python configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin
 --use-arch=i386


 On Oct 18, 2009, at 8:29 PM, Darren Dale wrote:

 I just recently started working with OS X, and was wondering if
 someone could point me to some discussion about best practices for
 installing Qt and PyQt. For example, today I installed the Qt-4.6 beta
 dmg, but was surprised that symlinks to tools like designer were not
 created on the path. Likewise, I installed the most recent sip and
 PyQt4 snapshots, and after installing I was surprised that I could not
 find utilities like pyuic4 on the path. I'm using the python that
 shipped with snow leopard (2.6.1), and packages using distutils, like
 numpy, scipy, matplotlib, Distribute and nose, all installed to
 /Library/Python/2.6/site-packages, which I guess is where I want them,
 as opposed to /System/Library/Frameworks/... but I think sip and PyQt4
 installed into Frameworks. Is this intentional? Any advice from
 seasoned os x veterans?

 Thanks,
 Darren
 ___
 PyQt mailing list    p...@riverbankcomputing.com
 http://www.riverbankcomputing.com/mailman/listinfo/pyqt

 -
 William Kyngesburye kyngchaos*at*kyngchaos*dot*com
 http://www.kyngchaos.com/

 All generalizations are dangerous, even this one.




___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] question about installation best practices on OS X

2009-10-19 Thread Robert Bobbson
One thing you are going to find out is that Apple isn't the quickest on the 
draw with updating things like Python.  It's
only recently that they made a move to anything near the 2.6 line, so I
have long since given up on using the stock python if I'm interested in
being up to date version-wise.

With some reservation, I'll
recommend using something like macports to manage these things as they
are maintained up to date, and it takes care of dependencies and other
fun things like library paths, etc.  MacPorts sets things up in /opt.

The reason for the
reservation is that at the time I built PyQt and all the supporting
packages, none of them appeared to have a binary version available for Snow 
Leopard (this was ~2 weeks ago now).  So, that meant the source had to be
downloaded and built from scratch.  That took about 12 hours on a 2
year old MacBook Pro. 
That didn't include the hour or two of tweaking the source packages to
get around some errors and warnings that were slowing down the process
even further.  It brought back warm fuzzy feelings for the Gentoo box
that I just retired a little while ago.

As those source only
options are replaced with binary packages, you should see install
performance comparable to Debian/Ubuntu/RedHat and their package
management tools, with all the corresponding benefits of having a
framework keep track of versions and dependencies.

Even if you don't use macports for pyqt, you might consider it for managing a 
whole slew of other apps, just like you would on a linux box or a 
windows+cygwin box.

-Rob



- Original Message 
From: Darren Dale dsdal...@gmail.com
To: William Kyngesburye kyngch...@kyngchaos.com
Cc: PyQt Mailing List pyqt@riverbankcomputing.com
Sent: Mon, October 19, 2009 7:06:20 AM
Subject: Re: [PyQt] question about installation best practices on OS X

Excellent, thank you for the pointer.

May I request a feature? Could this be mentioned somewhere in the mac
README? Or would it be possible to add some logic to the mac
installation scripts to find where distutils installs packages by
default?

Darren

On Sun, Oct 18, 2009 at 11:04 PM, William Kyngesburye
wokl...@kyngchaos.com wrote:
 By default (as you've noticed), SIP and PyQt install their binary
 executables in the framework.  This is fine for the python.org Python, but
 installing in the system frameworks is not quite proper.

 What I do for SIP and PyQt and the system python is specify a custom bin
 (and site-packages and other files) location in configuration:

 SIP:

 python configure.py -n -d /Library/Python/2.6/site-packages -b
 /usr/local/bin -e /usr/local/include -v /usr/local/share/sip --arch=i386 -s
 MacOSX10.6.sdk

 PyQt:

 export QTDIR=/Developer/Applications/Qt
 python configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin
 --use-arch=i386


 On Oct 18, 2009, at 8:29 PM, Darren Dale wrote:

 I just recently started working with OS X, and was wondering if
 someone could point me to some discussion about best practices for
 installing Qt and PyQt. For example, today I installed the Qt-4.6 beta
 dmg, but was surprised that symlinks to tools like designer were not
 created on the path. Likewise, I installed the most recent sip and
 PyQt4 snapshots, and after installing I was surprised that I could not
 find utilities like pyuic4 on the path. I'm using the python that
 shipped with snow leopard (2.6.1), and packages using distutils, like
 numpy, scipy, matplotlib, Distribute and nose, all installed to
 /Library/Python/2.6/site-packages, which I guess is where I want them,
 as opposed to /System/Library/Frameworks/... but I think sip and PyQt4
 installed into Frameworks. Is this intentional? Any advice from
 seasoned os x veterans?

 Thanks,
 Darren
 ___
 PyQt mailing listPyQt@riverbankcomputing.com
 http://www.riverbankcomputing.com/mailman/listinfo/pyqt

 -
 William Kyngesburye kyngchaos*at*kyngchaos*dot*com
 http://www.kyngchaos.com/

 All generalizations are dangerous, even this one.




___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt



  
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] question about installation best practices on OS X

2009-10-19 Thread Darren Dale
On Mon, Oct 19, 2009 at 6:55 PM, Robert Bobbson rbobb...@yahoo.com wrote:
 One thing you are going to find out is that Apple isn't the quickest on the 
 draw with updating things like Python.  It's
 only recently that they made a move to anything near the 2.6 line, so I
 have long since given up on using the stock python if I'm interested in
 being up to date version-wise.

 With some reservation, I'll
 recommend using something like macports to manage these things as they
 are maintained up to date, and it takes care of dependencies and other
 fun things like library paths, etc.  MacPorts sets things up in /opt.

 The reason for the
 reservation is that at the time I built PyQt and all the supporting
 packages, none of them appeared to have a binary version available for Snow 
 Leopard (this was ~2 weeks ago now).  So, that meant the source had to be
 downloaded and built from scratch.  That took about 12 hours on a 2
 year old MacBook Pro.
 That didn't include the hour or two of tweaking the source packages to
 get around some errors and warnings that were slowing down the process
 even further.  It brought back warm fuzzy feelings for the Gentoo box
 that I just retired a little while ago.

 As those source only
 options are replaced with binary packages, you should see install
 performance comparable to Debian/Ubuntu/RedHat and their package
 management tools, with all the corresponding benefits of having a
 framework keep track of versions and dependencies.

 Even if you don't use macports for pyqt, you might consider it for managing a 
 whole slew of other apps, just like you would on a linux box or a 
 windows+cygwin box.

Thanks for the suggestion. I have been using Gentoo for about 5 years
and Ubuntu for 2, and am trying macports now.

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] question about installation best practices on OS X

2009-10-19 Thread William Kyngesburye
Hmm, Macports.  It's great for those who want a familiar packagae- 
manager setup or just don't want to get their fingers dirty compiling  
source.  It adds itself to your PATH and can cause trouble for non- 
Macports builds (getting wrong versions of tools in the system, like  
GNU vs. BSD versions, wrong libs linked).  I don't mean to start a  
debate over it, just pointing out that you might want to look at  
trying to do things the Mac way first, like installers where available.


Python does have up-to-date installers for a more Mac-standard Python  
framework install.


On Oct 19, 2009, at 8:36 PM, Darren Dale wrote:

On Mon, Oct 19, 2009 at 6:55 PM, Robert Bobbson rbobb...@yahoo.com  
wrote:
Even if you don't use macports for pyqt, you might consider it for  
managing a whole slew of other apps, just like you would on a linux  
box or a windows+cygwin box.


Thanks for the suggestion. I have been using Gentoo for about 5 years
and Ubuntu for 2, and am trying macports now.


-
William Kyngesburye kyngchaos*at*kyngchaos*dot*com
http://www.kyngchaos.com/

Those people who most want to rule people are, ipso-facto, those  
least suited to do it.


- A rule of the universe, from the HitchHiker's Guide to the Galaxy


___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] question about installation best practices on OS X

2009-10-18 Thread Darren Dale
I just recently started working with OS X, and was wondering if
someone could point me to some discussion about best practices for
installing Qt and PyQt. For example, today I installed the Qt-4.6 beta
dmg, but was surprised that symlinks to tools like designer were not
created on the path. Likewise, I installed the most recent sip and
PyQt4 snapshots, and after installing I was surprised that I could not
find utilities like pyuic4 on the path. I'm using the python that
shipped with snow leopard (2.6.1), and packages using distutils, like
numpy, scipy, matplotlib, Distribute and nose, all installed to
/Library/Python/2.6/site-packages, which I guess is where I want them,
as opposed to /System/Library/Frameworks/... but I think sip and PyQt4
installed into Frameworks. Is this intentional? Any advice from
seasoned os x veterans?

Thanks,
Darren
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] question about installation best practices on OS X

2009-10-18 Thread William Kyngesburye
By default (as you've noticed), SIP and PyQt install their binary  
executables in the framework.  This is fine for the python.org Python,  
but installing in the system frameworks is not quite proper.


What I do for SIP and PyQt and the system python is specify a custom  
bin (and site-packages and other files) location in configuration:


SIP:

python configure.py -n -d /Library/Python/2.6/site-packages -b /usr/ 
local/bin -e /usr/local/include -v /usr/local/share/sip --arch=i386 -s  
MacOSX10.6.sdk


PyQt:

export QTDIR=/Developer/Applications/Qt
python configure.py -d /Library/Python/2.6/site-packages -b /usr/local/ 
bin --use-arch=i386



On Oct 18, 2009, at 8:29 PM, Darren Dale wrote:


I just recently started working with OS X, and was wondering if
someone could point me to some discussion about best practices for
installing Qt and PyQt. For example, today I installed the Qt-4.6 beta
dmg, but was surprised that symlinks to tools like designer were not
created on the path. Likewise, I installed the most recent sip and
PyQt4 snapshots, and after installing I was surprised that I could not
find utilities like pyuic4 on the path. I'm using the python that
shipped with snow leopard (2.6.1), and packages using distutils, like
numpy, scipy, matplotlib, Distribute and nose, all installed to
/Library/Python/2.6/site-packages, which I guess is where I want them,
as opposed to /System/Library/Frameworks/... but I think sip and PyQt4
installed into Frameworks. Is this intentional? Any advice from
seasoned os x veterans?

Thanks,
Darren
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


-
William Kyngesburye kyngchaos*at*kyngchaos*dot*com
http://www.kyngchaos.com/

All generalizations are dangerous, even this one.


___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt