Re: [Pythonmac-SIG] Can't build PIL on Snow Leopard

2009-12-07 Thread Ned Deily
In article ,
 Xiao Yu  wrote:
> There is no problem at all when I use Apple Python with pretty much 
> everything. Except when I have to distribute it with py2app. A separate 
> Python is essential for me. I could use MacPort or Fink but that would put me 
> a few versions behind the latest release. I'd really like to just use Python 
> from python.org and add all the libraries I need but I can't seem to compile 
> any libraries for this Python. They all end with a similar error. I'm not 
> sure what I'm missing. It gives the same error when I try to egg this too. 

For what it's worth, the MacPorts pythons seem to be keeping right 
up-to-date with the latest releases. 

   $ sudo port selfupdate
   $ sudo port install py26-pil py26-py2app-devel

should get you a working PIL 1.1.6, py2app 0.4.4, and python 2.6.4, all 
rooted in /opt/local/, e.g. /opt/local/bin/python2.6.

-- 
 Ned Deily,
 n...@acm.org

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


[Pythonmac-SIG] Installing Python 2.6.4 alongside stock python 2.6.1 on SnowLeopard

2009-12-07 Thread Erik van Blokland
Hi,

sorry to bother, but I've run into a spot of trouble in an area I'm not 
familiar with.
(Ronald, this is a follow up of the post I sent yesterday, I'm sorry for the 
moving target. I'm stuck.)

I installed python 2.6.4 on Snow Leopard 10.6.2. I used the prepackaged .dmg 
installer from python.org.

The new 2.6.4:
[eBook:pyobjc/trunk/launch] erik% python
Python 2.6.4 (r264:75821M, Oct 27 2009, 19:48:32) 

The stock python 2.6.1 is also still there:
[eBook:pyobjc/trunk/launch] erik% /usr/bin/python
Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) 

With casual testing the new 2.6.4 seems to work well. But when installing other 
libraries I get very peculiar crashes. Installing Twisted and Pyobjc (both from 
source, not easy_install)  end in a similar way with lipo complaining and 
references to a 10.4 sdk: /Developer/SDKs/MacOSX10.4u.sdk.
The /Developer/SDKs dir contains a 10.6 sdk. But I am not familiar with what 
happens or should happen in this place.
I posted a question about this on the twistd list earlier, but now I see the 
same thing happen with trying to install pyobjc, I suspect something in my 
installation has gone wrong. My next step seems to be to reinstall Snow 
Leopard. Any pointers are welcome. 

Could it be related to 32 / 64 bit issues?

Regards, Erik

Tail of the pyobjc install log:

building 'launch._launch' extension
gcc-4.0 -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 
-I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c 
Modules/_launch.c -o build/temp.macosx-10.3-fat-2.6/Modules/_launch.o
In file included from 
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/unicodeobject.h:4,
 from 
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:85,
 from Modules/_launch.c:1:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No 
such file or directory
In file included from 
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/unicodeobject.h:4,
 from 
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:85,
 from Modules/_launch.c:1:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No 
such file or directory
lipo: can't figure out the architecture type of: /var/tmp//ccNyhKCK.out
error: command 'gcc-4.0' failed with exit status 1
[eBook:pyobjc/trunk/launch] erik% 

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


Re: [Pythonmac-SIG] OSX3 install problem

2009-12-07 Thread downie -


> To: pythonmac-sig@python.org
> From: n...@acm.org
> Date: Fri, 4 Dec 2009 17:41:24 -0800
> Subject: Re: [Pythonmac-SIG] OSX3 install problem
> 
[snip]
> All of that is interesting and should be pinned down further so it 
> doesn't happen again.  I've opened a python bug tracker issue for it: 
> http://bugs.python.org/issue7437 but that doesn't help you with getting 
> 2.6.4 running on 10.3.  You noted that 2.5.4 installs OK.  If you're OK 
> with just 2.5.4, then great.  I can't think of a particularly easy way 
> to workaround the 2.6.4 problem without going in and messing with the 
> installer image itself.  For testing purposes, I could whip up a 
> 10.4-built image for you but that's not a long-term solution. 
Yes, the Python script I wanted to run works fine under 2.5.4 .
I registered with the bugtracker but couldn't work out how to add myself to the 
notification list - I'll be leaving this mailing list shortly.
> 
> Thanks for flagging this and for sending the extra logging info.

Hey, I'm just a bug-magnet.
Thanks for the help.
GD
_
Windows 7: Unclutter your desktop. Learn more.
http://www.microsoft.com/windows/windows-7/videos-tours.aspx?h=7sec&slideid=1&media=aero-shake-7second&listid=1&stop=1&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_7secdemo:122009___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Installing Python 2.6.4 alongside stock python 2.6.1 on SnowLeopard

2009-12-07 Thread Ned Deily
In article <9a61427d-09ed-4dd1-9474-6e1a14f9e...@letterror.com>,
 Erik van Blokland  wrote:

> Hi,
> 
> sorry to bother, but I've run into a spot of trouble in an area I'm not 
> familiar with.
> (Ronald, this is a follow up of the post I sent yesterday, I'm sorry for the 
> moving target. I'm stuck.)
> 
> I installed python 2.6.4 on Snow Leopard 10.6.2. I used the prepackaged .dmg 
> installer from python.org.
> 
> The new 2.6.4:
> [eBook:pyobjc/trunk/launch] erik% python
> Python 2.6.4 (r264:75821M, Oct 27 2009, 19:48:32) 
> 
> The stock python 2.6.1 is also still there:
> [eBook:pyobjc/trunk/launch] erik% /usr/bin/python
> Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) 
> 
> With casual testing the new 2.6.4 seems to work well. But when installing 
> other libraries I get very peculiar crashes. Installing Twisted and Pyobjc 
> (both from source, not easy_install)  end in a similar way with lipo 
> complaining and references to a 10.4 sdk: /Developer/SDKs/MacOSX10.4u.sdk.
> The /Developer/SDKs dir contains a 10.6 sdk. But I am not familiar with what 
> happens or should happen in this place.
> I posted a question about this on the twistd list earlier, but now I see the 
> same thing happen with trying to install pyobjc, I suspect something in my 
> installation has gone wrong. My next step seems to be to reinstall Snow 
> Leopard. Any pointers are welcome. 

You need to install the optional 10.4u SDK.  It is included in the Xcode 
installer (on the Snow Leopard DVD) but, by default, is not selected for 
installation.

-- 
 Ned Deily,
 n...@acm.org

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


Re: [Pythonmac-SIG] OSX3 install problem

2009-12-07 Thread Ned Deily
In article ,
 downie -  wrote:
> Yes, the Python script I wanted to run works fine under 2.5.4 .
> I registered with the bugtracker but couldn't work out how to add myself to 
> the notification list - I'll be leaving this mailing list shortly.

Edit the nosy field of the bug to add your registered name.

-- 
 Ned Deily,
 n...@acm.org

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


Re: [Pythonmac-SIG] Can't build PIL on Snow Leopard

2009-12-07 Thread Christopher Barker

Xiao Yu wrote:
There is no problem at all when I use Apple Python with pretty much 
everything. Except when I have to distribute it with py2app. A separate 
Python is essential for me. I could use MacPort or Fink ...


I need but I can't seem to compile any libraries for this Python. They 
all end with a similar error.


what else have you tried to compile other than PIL?

Anyway, to compile PIL, you need its dependencies -- you can use 
macports or fink to build *jsut the dependencies*, and still use the 
Apple or python.org python.


I'm not sure what I'm missing. It gives 
the same error when I try to egg this too. 


If the egg is a source egg, then it will try to build, so it's almost 
exactly the same as downloading and building by hand.


-CHB


--
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


Re: [Pythonmac-SIG] Installing Python 2.6.4 alongside stock python 2.6.1 on SnowLeopard

2009-12-07 Thread Erik van Blokland

On 7 dec 2009, at 19:55, Ned Deily wrote:

>> Leopard. Any pointers are welcome. 
> 
> You need to install the optional 10.4u SDK.  It is included in the Xcode 
> installer (on the Snow Leopard DVD) but, by default, is not selected for 
> installation.

Ai caramba! I had indeed not installed it from the SL installer. (There was a 
10.4u SDK folder present, I guess not the right one). 
That did the trick, pyobjc and twisted installed without a hitch. What a relief 
:)
Many many thanks!

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


[Pythonmac-SIG] py2app/PyQt/64-bit/Mach-O

2009-12-07 Thread Xiao Yu
Hi,

I think this problem might have been previously discussed but I'm not too sure 
what the solution is.
I'm attempting to build my PyQt4 application. 

I'm receiving an error here:

File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app/build_app.py",
 line 589, in _run
self.run_normal()
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app/build_app.py",
 line 660, in run_normal
self.create_binaries(py_files, pkgdirs, extensions, loader_files)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app/build_app.py",
 line 768, in create_binaries
mm.mm.run_file(runtime)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/MachOGraph.py",
 line 66, in run_file
m = self.createNode(MachO, pathname)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/MachOStandalone.py",
 line 23, in createNode
res = super(FilteredMachOGraph, self).createNode(cls, name)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/altgraph/ObjectGraph.py",
 line 148, in createNode
m = cls(name, *args, **kw)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/MachO.py",
 line 63, in __init__
self.load(file(filename, 'rb'))
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/MachO.py",
 line 78, in load
self.load_header(fh, 0, size)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/MachO.py",
 line 108, in load_header
hdr = MachOHeader(self, fh, offset, size, magic, hdr, endian)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/MachO.py",
 line 148, in __init__
self.load(fh)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/MachO.py",
 line 161, in load
header = self.mach_header.from_fileobj(fh, **kw)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/ptypes.py",
 line 44, in from_fileobj
return cls.from_str(f.read(cls._size_), **kw)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/ptypes.py",
 line 48, in from_str
return cls.from_tuple(struct.unpack(endian + cls._format_, s), **kw)
error: unpack requires a string argument of length 32
> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/ptypes.py(48)from_str()
-> return cls.from_tuple(struct.unpack(endian + cls._format_, s), **kw)

Any solutions?
I have 
qt4-mac 4.5.3
python26 @2.6.4_0+darwin
py26-sip @4.9.3_0
py26-pyqt4 @4.6.2_0
py26-py2app-devel @0.4.4_0
py26-macholib @1.2.1_2 

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


Re: [Pythonmac-SIG] py2app/PyQt/64-bit/Mach-O

2009-12-07 Thread Kevin Walzer

On 12/6/09 5:00 AM, Xiao Yu wrote:

Hi,

I think this problem might have been previously discussed but I'm not too sure 
what the solution is.
I'm attempting to build my PyQt4 application.



error: unpack requires a string argument of length 32

/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/macholib/ptypes.py(48)from_str()

->  return cls.from_tuple(struct.unpack(endian + cls._format_, s), **kw)




It's a problem with macholib (part of py2app). I've run into something 
similar trying to build a 64-bit Tkinter application, and I've seen 
other problems on the list with PyObjC. I don't know enough about 
macholib to offer a patch, and no one else has had time to delve into 
it. If you run across a solution, some of us would be glad to hear it!


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] py2app/PyQt/64-bit/Mach-O

2009-12-07 Thread Kevin Walzer

On 12/7/09 10:13 PM, Nehemiah Dacres wrote:

the solution is to fix the endian bug. you're on intel right? I bet if
you used the new PySide qt python bridge, it wouldn't have this problem.
I bet its talking directly to the c++ runtime  instead of  Â


It may be an issue with endian-ness, but the same problem has shown up 
with four-way universal builds of applications using Tkinter (mine) and 
PyObjC (see 
http://mail.python.org/pipermail/pythonmac-sig/2008-August/020423.html). 
It's an issue with macholib and/or py2app, in that they don't seem to be 
able to handle four-way universal builds. So PySide may not be the 
answer at all.


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig