[Distutils] distribute 0.6.10 and convert_2to3_doctests

Lennart Regebro regebro at gmail.com
Tue Jan 26 17:53:24 CET 2010


On Thu, Jan 7, 2010 at 14:34, Lennart Regebro <regebro at gmail.com> wrote:
> The next problem is that the tests seem to be run on the original, and
> not on the build-copy. And why that is, I don't know, and I have to
> debug that, which I can't do right now. I'll try tonight or tomorrow.
> It's most likely a bug in Distribute.

Well, kinda. :)

The problem is this code in setup.py:

    from munepy import __version__

That means munepy is already imported, so when it then looks for the
tests to run, it will import it from the already imported munepy
module. Changing it to

    from munepy import __version__
    del sys.modules['munepy']

Goes around the problem, but it's admittedly not a pretty fix.
I'm sure others will be bitten by this too. I'm not sure what a good
fix would be, except possibly removing all modules specified in
setup.py from sys.modules before running any commands.

-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64


More information about the Distutils-SIG mailing list