[p4python] p4python for python 2.5 and windows vista x64

Sven Erik Knop sknop at perforce.com
Mon Jun 23 02:22:49 PDT 2008

Hi Yuta,

The main problem you will encounter is that Python on Windows has been 
compiled with VS2003, not VS2005. This will prevent you from compiling 
P4Python 2007.3 successfully from compiling with the VS2005 or VS2008 
compiler. For this reason, there is no option in the setup.py that 
detects your 64 bit environment on Windows.

We have not tested 64 bit on Windows yet for P4Python, but the P4Python 
code itself is 64 bit clean and has been built successfully on 64 bit 
Solaris and Linux. I will try to test VS2003 on a 64 bit machine to see 
if I can get this combination to run.

If you cannot get hold of a VS2003 compiler, you will need to recompile 
Python itself on VS2005 or VS2008 to create the correct binary. You 
might have to re-configure quite a bit of the setup files for this, and 
your mileage may vary.


Sven Erik

yuta araki wrote:
> Hey Robert,
> Thank you for the info.
> I didn't know about 2007.3 ver.
> Been using 1.2 to compile.
> I gave a try for 2007.3 but got "AttributeError: MSVCCompiler instance 
> has no attribute '_MSVCCompiler__root'"
> I looked on internet and found setting DISTUTILS_USE_SDK=1 trick, 
> which let me compile the thing with lots of error.
> If I embed manifest file, it does import successfully in python, but 
> when I try to do:
> import P4
> p4c = P4.P4()
> p4c.connect()
> p4c.run('info')
> it crashes pythonw.exe.
> When I ran VS2008 to debug, seems like MSVCR80.dll is where it getting 
> stack, but no idea what it really means.
> P4.P4.identify() gives me the following:
> >>> print P4.P4.identify()
> Perforce - The Fast Software Configuration Management System.
> Copyright 1995-2008 Perforce Software.  All rights reserved.
> Rev. P4Python/NTX86/2007.3/151416 (2007.3 API) (2008/04/09).
> So it seems like the compiler it used was 32bit version.
> I noticed when I looked into setup.py, the script seems to auto detect 
> which compiler to use from system variable.
> Is there anyway to override that to use 64bit compiler?
> I'm still newbie in this compiling business, I may have some system 
> setting wrong.
> But I really like to use this p4python.
> Any help appreciated!
> Thanks.
> Regards,
> Yuta
> On Thu, Jun 19, 2008 at 9:02 PM, Robert Cowham 
> <robert at vaccaperna.co.uk <mailto:robert at vaccaperna.co.uk>> wrote:
>     Which version of P4Python are you using: official 2007.3 or older 1.2?
>     The official version is fully supported by Perforce.
>     Regards
>     Robert
>         ------------------------------------------------------------------------
>         *From:* p4python-bounces at perforce.com
>         <mailto:p4python-bounces at perforce.com>
>         [mailto:p4python-bounces at perforce.com
>         <mailto:p4python-bounces at perforce.com>] *On Behalf Of *yuta araki
>         *Sent:* 19 June 2008 12:20
>         *To:* p4python at perforce.com <mailto:p4python at perforce.com>
>         *Subject:* [p4python] p4python for python 2.5 and windows
>         vista x64
>         Hello all,
>         I've been looking around to find information about p4python
>         for python 2.5 64bit version.
>         I'd like to use it with our graphic package which is Maya.
>         The whole environment is in 64bit so I need the module built
>         with 64bit.
>         I tried to compile the source with no avail.
>         Seems like there are some issues with "Py_ssize_t" 's data
>         type not matching.
>         Does anyone have the binary for p4python or point me in right
>         direction?
>         I currently have python 2.5 built with VS2005 if that's any
>         significance.
>         Any help appreciated.
>         Thank you.
>         Yuta,
> ------------------------------------------------------------------------
> _______________________________________________
> p4python mailing list
> p4python at perforce.com
> http://maillist.perforce.com/mailman/listinfo/p4python
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.perforce.com/pipermail/p4python/attachments/20080623/5dbc0dbe/attachment-0001.html>

More information about the p4python mailing list