[issue1673] Setup error: AttributeError: 'module' object has no attribute 'posixfile'
Steve Borho
steve at borho.org
Wed May 27 21:32:46 CDT 2009
On Sun, May 24, 2009 at 2:47 AM, Alexandr N Zamaraev
<mercurial-bugs at selenic.com> wrote:
>
> New submission from Alexandr N Zamaraev <tonal at promsoft.ru>:
>
> changeset: 8559:5726bb290bfe
> tag: tip
> user: Matt Mackall <mpm at selenic.com>
> date: Sat May 23 11:53:23 2009 -0500
> summary: revlog: fix reading of larger revlog indices on Windows
>
> F:\Lang\sf.net\hg\hg>setup.py build -cmingw32
> warning: could not establish Mercurial version:
> warning: Not importing directory 'F:\Lang\sf.net\hg\hg\locale': missing __init__.py
> Traceback (most recent call last):
> File "hg", line 25, in <module>
> mercurial.util.set_binary(fp)
> File "F:\Lang\sf.net\hg\hg\mercurial\demandimport.py", line 75, in
> __getattribute__
> self._load()
> File "F:\Lang\sf.net\hg\hg\mercurial\demandimport.py", line 47, in _load
> mod = _origimport(head, globals, locals)
> File "F:\Lang\sf.net\hg\hg\mercurial\util.py", line 742, in <module>
> from windows import *
> File "F:\Lang\sf.net\hg\hg\mercurial\demandimport.py", line 84, in _demandimport
> return _origimport(name, globals, locals, fromlist)
> File "F:\Lang\sf.net\hg\hg\mercurial\windows.py", line 21, in <module>
> posixfile.__doc__ = osutil.posixfile.__doc__
> File "F:\Lang\sf.net\hg\hg\mercurial\demandimport.py", line 76, in
> __getattribute__
> return getattr(self._module, attr)
> AttributeError: 'module' object has no attribute 'posixfile'
This was caused by changeset b6d0fa8c7685, and the traceback only happens:
1) You run setup.py on Windows
2) You have a compiled osutil.pyd is in the mercurial directory
The osutil.pyd is picked up by Python before the pure/osutil.py and
the only way I've found around this is to delete the pyd before
running my installer build scripts.
Anyone know of a Python friendly solution to this?
--
Steve Borho
More information about the Mercurial-devel
mailing list