[python-win32] Building pywin32 & adsi support

Tim Golden mail at timgolden.me.uk
Tue Jan 21 14:13:07 CET 2014


On 21/01/2014 12:20, Mark Hammond wrote:
> On 21/01/2014 9:23 PM, Tim Golden wrote:
>> I'm trying to bring my active_directory module up to scratch with Python
>> 3. I'm hitting a couple of effective showstoppers.
>>
>> First: I can't even build pywin32 for any revision past 337015e6d473,
>> which is when the IConverterSession stuff went in. I've tried a couple
>> of tweaks, but basically:
>>
>> """
>> com/win32comext/mapi/src/mapi.cpp(645) : fatal error C1083: Cannot open
>> include file: 'IConverterSession.h': No such file or directory
>> error: command '"c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\BIN\cl.exe"' failed with exit status 2
>> """
> 
> Hrmph - I thought I recall screwing that up and Roger checking a fix in
> - probably the most recent pywin32 checkin.

Not unless he's done it in the last 30 minutes ;)

> 
> 
>> Second: the adsi module won't import even in a released pywin32 218
>> install on any version of Python 3.x I have installed. It seems to have
>> fallen foul of Python 3's more restricted relative import semantics.
>> This is Python 3.3 but the same happens for 3.2 & 3.1 and for several
>> different incantations of the import (from win32com etc.)
>>
>>>>> import win32com.adsi
>> Traceback (most recent call last):
>>    File "<stdin>", line 1, in <module>
>>    File "C:\Python33\lib\site-packages\win32comext\adsi\__init__.py",
>> line 25, in <module>
>>      from adsi import *
>> ImportError: No module named 'adsi'
>>>>>
> 
> And hrmph2!  I thought 2to3 did magic there.

Tricky, I'd have thought: that could be a perfectly valid import
unchanged for some configurations. I'm not sure how 2to3's static
analysis could be sure about it.

Thanks for looking into it

TJG


More information about the python-win32 mailing list