[Zope-dev] Bootstrapping ZCA for Python 3.

Lennart Regebro regebro at gmail.com
Tue Dec 15 11:57:45 EST 2009


On Tue, Dec 15, 2009 at 14:21, Marius Gedminas <marius at gedmin.as> wrote:
> On Tue, Dec 15, 2009 at 10:22:03AM +0100, Lennart Regebro wrote:
>> And now it's zc.buildout. It also uses itself, to set up the
>> environment so that you can test it. I did try using distribute
>> instead, but I get strange inconsistent errors, different ones each
>> time I try. :-/
>>
>> If someone can set up a way of running the tests for zc.buildout
>> without using zc.buildout, I'm sure I can help port it to Python 3,
>> but for now I give up. :-)
>
> How about virtualenv?

I don't see how that helps. But in any case it's not ported to Python
3 yet afaik.

>  svn checkout svn+ssh://svn.zope.org/repos/main/zc.buildout/trunk zc.buildout
>  cd zc.buildout
>  virtualenv tmp
>  tmp/bin/easy_install zope.testing
>  tmp/bin/python setup.py develop
>  cd zc.recipe.egg_
>  ../tmp/bin/python setup.py develop
>  cd ...
>  tmp/bin/zope-testrunner --test-path=src
>
> When I tried this on Python 2.6 I got some failures, e.g.

I do not get a zope-testrunner or even a bin directory when doing this.

On Tue, Dec 15, 2009 at 14:38, Reinout van Rees <reinout at vanrees.org> wrote:
> On 12/15/09 2:21 PM, Marius Gedminas wrote:
>> If I weren't extremely hungry and starving, I'd run the tests in the official
>> fashion (bin/buildout&&  bin/test) and see if I get the same failures.
>
> Be sure to look at DEVELOPERS.txt in the root (you need pythons without
> setuptools and you need to run with "-c dev.cfg" if memory serves me).

I have, and it says to run python dev.py. Dev py import zc.buildout.
That fails, as zc.buildout isn't ported to Python 3 yet.

This is the same bootstrapping problem I had with setuptools (who uses
itself to install/build itself) and zope.testing (who uses it's own
testrunner to run the tests).

For setuptools we fixed it by an ugly hack that means 2to3 is run on
all of setuptools as soon as you run setup.py. For zope.testing I made
a custom test command for setuptools that creates a test-script in the
temp directory "manually", and then calls it, which is possibly a
slightly less ugly hack.

Possibly that last trick might work for zc.buildout too, I haven't investigated.

-- 
Lennart Regebro: http://regebro.wordpress.com/
Python 3 Porting: http://python-incompatibility.googlecode.com/
+33 661 58 14 64


More information about the Zope-Dev mailing list