[Distutils] zc.buildout: Build python in buildout
Christian Zagrodnick
cz at gocept.com
Thu Nov 29 08:04:06 CET 2007
On 2007-11-28 21:48:13 +0100, Jim Fulton <jim at zope.com> said:
>
> On Nov 28, 2007, at 12:41 PM, Christian Zagrodnick wrote:
>
>> Hey,
>>
>> building python with buildout is not very hard (see below).
>>
>> When installing sections buildout apparently uses the built python to
>> get dependencies and compile the C extensions if any.
>>
>> Only the dependencies of the recipes are fetched via the bootstrap
>> python. But with C extensions this is the problem. For instance
>> zc.zodbrecipes depend on ZODB3 which is then compiled with the wrong
>> python.
>>
>> This would not be much of a problem but I then get those errors:
>>
>> ImportError:
>> /tmp/test/eggs/ZODB3-3.8.0b4-py2.4-linux-x86_64.egg/persistent/
>> cPersistence.so:
>> undefined symbol: PyUnicodeUCS4_AsEncodedString
>
> Ouch.
>
> I guess the Python used to run the buildout and the Python built by
> the buildout are the same Python version.
Yes.
>
>> Any clue what to do?
>
> I have clues, although I'm not sure they'll be useful. If the Python
> used to run the buildout and the Python built by the buildout were
> different versions, then you'd be OK.
Yes. That was my first guess, too. The problem is that there is only a
sort of broken python2.4 available there. So I had to come up with
something else. :/
>
> I suspect that a better solution would be to find a way to bootstrap
> the buildout in a way that included building Python as part of the
> bootstrapping process.
That would certainly the best approach. Only that I have no idea how to
do that. :(
>
>> I suppose the only way is to make the two pythons
>> eat the same .so files?
>
> I don't know how you'd do that.
Ubuntu's Python is compiled with --enable-uncide=ucs4 which leads to
the incompatibiliby. When compiling the Python in buildout with this
option everything works fine (so far anyway).
So, no, there is no general approach to fix the incompatibility, yet.
Only on specific for this one Server.
Anyway, thanks for the ideas.
Regards,
--
Christian Zagrodnick
gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale
www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891
More information about the Distutils-SIG
mailing list