[Pythonmac-SIG] P4Python, MySQLdb, or Python Extensions

Lyndsey Ferguson lyndsey.ferguson at gmail.com
Mon Oct 8 22:57:03 CEST 2007


Hello everyone,
Short time lurker, first time poster.

I'm trying to install P4Python and MySQLdb, but am running into a host of
issues.

The trouble I've had trying to install these two and the number of similar
experiences I've read through googling leads me to believe that Python can
be difficult on the Mac.

I will talk about P4Python as it seems to be the easier of the two. I'm
trying to compile the given c++ file to build a Python Extension, but the
setup.py doesn't work as it should be linking in CoreFoundation, but it is
not.

ImportError: Failure linking new module:
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/P4Client.so:
Symbol not found: ___CFConstantStringClassReference
  Referenced from:
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/P4Client.so
  Expected in: dynamic lookup


I tried to use Xcode to build something that can go where the site-packages
go. But I have no idea what to build. It is not a dynamic library, it is not
a relocatable object, I get this error when I try to import:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "p4.py", line 19, in ?
    import P4Client
ImportError: Inappropriate file type for dynamic loading


Has anyone done this? How do I build a Python Extension using Xcode? Or
perhaps even better, how do I get setup.py to work on the Mac?

Thanks for any and all tips!
Lyndsey Ferguson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20071008/5d3947e4/attachment.htm 


More information about the Pythonmac-SIG mailing list