[python-win32] Building pywin32 on Vista 64

Marc-André Belzile mbelzile at softimage.com
Fri Mar 7 15:43:10 CET 2008

Are there any directives regarding x64 version in setup.py ? I can't find them. I downloaded pywin32-210.zip and the setup.py file is dated from 23/09/2006. 
Is there a newer version ?


From: Mark Hammond [mailto:mhammond at skippinet.com.au] 
Sent: March 6, 2008 5:21 PM
To: Marc-André Belzile; python-win32 at python.org
Subject: RE: [python-win32] Building pywin32 on Vista 64

It looks like a bug to me - but for some reason I don't hit it.  Last I checked, the x64 version of pywin32 builds fine following the instructions at the top of setup.py (but last I tried, it was cross-compiling from a 32bit environment)




From: python-win32-bounces at python.org [mailto:python-win32-bounces at python.org] On Behalf Of Marc-André Belzile
Sent: Friday, 7 March 2008 2:37 AM
To: python-win32 at python.org
Subject: Re: [python-win32] Building pywin32 on Vista 64


Looks like MSVCCompiler hasn't been fixed yet to support AMD64 architectures. __root is referenced by get_msvc_paths but wasn't set in __init__.


Known bug ?


My current settings:


self.__product -> Microsoft SDK compiler 14.0
self.__version -> 8.0
self.__arch -> AMD64


class MSVCCompiler (CCompiler) :


    def __init__ (self, verbose=0, dry_run=0, force=0):
        CCompiler.__init__ (self, verbose, dry_run, force)
        self.__version = get_build_version()
        self.__arch = get_build_architecture()
        if self.__arch == "Intel":
            # x86
            if self.__version >= 7:
                self.__root = r"Software\Microsoft\VisualStudio"
                self.__macros = MacroExpander(self.__version)
                self.__root = r"Software\Microsoft\Devstudio"
            self.__product = "Visual Studio version %s" % self.__version
            # Win64. Assume this was built with the platform SDK
            self.__product = "Microsoft SDK compiler %s" % (self.__version + 6)

    def get_msvc_paths(self, path, platform='x86'):
        """Get a list of devstudio directories (include, lib or path).


        Return a list of strings.  The list will be empty if unable to
        access the registry or appropriate registry keys not found.


        if not _can_read_reg:
            return []


        path = path + " dirs"
        if self.__version >= 7:
            key = (r"%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories"
                   % (self.__root, self.__version))                   << line 616


From: python-win32-bounces at python.org [mailto:python-win32-bounces at python.org] On Behalf Of Marc-André Belzile
Sent: March 5, 2008 6:42 PM
To: python-win32 at python.org
Subject: [python-win32] Building pywin32 on Vista 64



I'm trying to build pywin32 ( on Vista 64 (AMD64) with VS 2005.


I'm stucked right at the beginning of the process with this error :


File "C:\Python25\lib\distutils\msvccompiler.py", line 616, in get_msvc_paths % (self.__root, self.__version))
AttributeError: my_compiler instance has no attribute '_MSVCCompiler__root'


I did install the windows server 2003 platform SDK (AMD64) and set both DISTUTILS_USE_SDK +  MSSdk as advertised. Still no succcess.


Any ideas what could go wrong ? 


Thank you




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20080307/67c9aa4e/attachment.htm 

More information about the python-win32 mailing list