[py-dev] Greenlets
holger krekel
hpk at trillke.net
Fri Dec 17 17:47:07 CET 2004
On Fri, Dec 17, 2004 at 12:41 +0100, Florian Schulze wrote:
> On Fri, 17 Dec 2004 02:47:55 +0100, holger krekel <hpk at trillke.net> wrote:
> >[Florian Schulze Thu, Dec 16, 2004 at 06:58:54PM +0100]
> >>I just saw that greenlets where imported into py and I wanted to try
> >>them
> >>out. Unfortunately they don't compile on windows, the offending line is
> >>#536:
> >>PyObject_HEAD_INIT(&PyType_Type)
> >>greenlet.c(536) : error C2099: Initialisierung ist keine Konstante
> >>roughly translated:
> >>greenlet.c(536) : error C2099: Initializer is not constant
> >>I looked into other extension modules and there all those lines read
> >>like
> >>this:
> >>PyObject_HEAD_INIT(NULL)
> >>
> >>It compiled with that line, but it crashes after the greenlets ran
> >>through.
> >
> >Does installing distutils-based C-coded packages usually work for you?
>
> Yes, if zope3, numarray, pygame etc counts ;)
OK, Armin worked around an underlying compiler limitation so you might
retry by using an updated py trunk and doing
python -c "import py ; py.magic.greenlet()"
this works fine on my linux machine. Look into py/__init__.py if you
want to find out where "magic.greenlet" comes from ...
> >>It's an really interesting idea though.
> >
> >Greenlets or integrating C-modules on the fly or both? :-)
>
> I only tried Greenlets yet, but the on the fly C-module stuff is also very
> cool. What happens when I start it with Python 2.3 it compiles and then I
> start it with Python 2.4, does it detect that it has to recompile?
Actually, it should detect this (but i haven't tried). Eventually,
i'd like to provide transparent means to store so/pycs files
into separated locations so you only compile-on-the-fly once per
python binary/platform or if the file changes ... The idea here
is to have a single checkout for multiple python versions in
an efficient way on windows/linux/unix platforms.
cheers,
holger
More information about the Pytest-dev
mailing list