[p4python] P4Python and Snow Leopard

Tom Cramer TCramer at vigilgames.com
Fri Sep 25 14:09:03 PDT 2009


Here's a quick hack to getting the P4API working in python on Snow
Leopard.  I used the 2009.1 versions here, YMMV with older versions.

First, edit setup.py and look around line 180 for the OS X detection
part of the script.  Add an extra

         elif unameOut[2][0] == "1" :
             release = "106"
             self.extra_link_args = ["-framework", "Carbon"]

While not precise, it gets things working for 10.6 (10.0.0 Darwin
kernel).

This should allow the build and install steps to work.  However, the
libraries from Perforce are missing x86_64 support, so scripts calling
the API may fail if you are on a 64 bit capable Mac.  I found this
command to flip python into 32 bit mode:

defaults write com.apple.versioner.python Prefer-32-Bit -bool yes

Thanks to http://www.jaharmi.com/2009/08/29/python_32_bit_execution_on_snow_leopard
  for the pointer on the 32 bit defaults setting.

-tom

This message, including any attachments, may contain privileged and/or confidential information. Any distribution or use of this email by anyone other than the intended recipient(s) is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and delete all copies. Thank you.




More information about the p4python mailing list