[PATCH] setup: remove unnecessary code for win32com (pywin32)

Steve Borho steve at borho.org
Sun Mar 13 14:58:41 CDT 2011


On Sun, Mar 13, 2011 at 2:08 PM, Adrian Buehlmann <adrian at cadifra.com> wrote:
> On 2011-03-13 19:54, Steve Borho wrote:
>> On Sun, Mar 13, 2011 at 9:52 AM, Adrian Buehlmann <adrian at cadifra.com> wrote:
>>> On 2011-03-13 14:51, Steve Borho wrote:
>>>> # HG changeset patch
>>>> # User Steve Borho <steve at borho.org>
>>>> # Date 1300024206 18000
>>>> # Node ID 54d0da111432c988721379af61cdcf127690f11d
>>>> # Parent  1bb2a56a9d73b386378564381807fdf8df38ea3f
>>>> setup: remove unnecessary code for win32com (pywin32)
>>>>
>>>> diff -r 1bb2a56a9d73 -r 54d0da111432 setup.py
>>>> --- a/setup.py        Thu Mar 10 13:43:47 2011 +0100
>>>> +++ b/setup.py        Sun Mar 13 08:50:06 2011 -0500
>>>> @@ -97,24 +97,8 @@
>>>>  try:
>>>>      import py2exe
>>>>      py2exeloaded = True
>>>> -
>>>> -    # Help py2exe to find win32com.shell
>>>> -    try:
>>>> -        import modulefinder
>>>> -        import win32com
>>>> -        for p in win32com.__path__[1:]: # Take the path to win32comext
>>>> -            modulefinder.AddPackagePath("win32com", p)
>>>> -        pn = "win32com.shell"
>>>> -        __import__(pn)
>>>> -        m = sys.modules[pn]
>>>> -        for p in m.__path__[1:]:
>>>> -            modulefinder.AddPackagePath(pn, p)
>>>> -    except ImportError:
>>>> -        pass
>>>> -
>>>>  except ImportError:
>>>>      py2exeloaded = False
>>>> -    pass
>>>>
>>>>  def runcmd(cmd, env):
>>>>      p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
>>>
>>> IMHO, this should go into stable, since it's bug to package pywin32 into
>>> the mercurial installer package if I happen to have pywin32 installed on
>>> my computer.
>>
>> I don't have a Windows box to test with at the moment, but I'm fairly
>> certain that this code does not add win32com.shell to the dist/
>> folder.  It simply adds a folder to py2exe's search path so that it
>> _could_ find it if it went looking for it.
>>
>
> It's always interesting to see how many arguments are pulled just to
> avoid having to push a bugfix to stable. <shrug>
>
> Stable = dead beef
>

I dunno, I pushed a different fix to stable a couple hours ago.  This
one didn't seem worth the trouble.

-- 
Steve Borho


More information about the Mercurial-devel mailing list