Re: building Genshi

2017-03-28 Thread Catonano
2017-03-19 22:33 GMT+01:00 Catonano :

> Ludo,
>
> 2017-03-19 22:05 GMT+01:00 Ludovic Courtès :
>
>> Hi,
>>
>> Catonano  skribis:
>>
>> > genshi/_speedups.c: In function ‘escape’:
>> > genshi/_speedups.c:89:13: error: ‘PyUnicodeObject’ has no member named
>> ‘str’
>> >  inp = in->str;
>> >  ^
>>
>> I don’t know much about Python, but to me that suggests that Genshi
>> expects a different CPython version than the one it has here.  Maybe a
>> 2.x vs. 3.x issue?
>>
>
> I found it, it's here
> https://genshi.edgewall.org/ticket/555
>
> I didn't find it earlier :-/
>
> Thanks, anyway
>

O, naive question: say that I want to try to build genshi only for python2

How would I do that ?

Thanks


building Genshi

2017-03-19 Thread Catonano
In building Genshi, an extension in C fails t build

writing manifest file 'Genshi.egg-info/SOURCES.txt'
running build_ext
building 'genshi._speedups' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3
-Wall -Wstrict-prototypes -fPIC
-I/gnu/store/alk9r3rir93pjmv8im20f8xrvv90219z-python-3.5.2/include/python3.5m
-c genshi/_speedups.c -o build/temp.linux-x86_64-3.5/genshi/_speedups.o
genshi/_speedups.c: In function ‘escape’:
genshi/_speedups.c:89:13: error: ‘PyUnicodeObject’ has no member named ‘str’
 inp = in->str;
 ^
genshi/_speedups.c:90:24: error: ‘PyUnicodeObject’ has no member named
‘length’
 while (*(inp) || in->length > inp - in->str) {
^
genshi/_speedups.c:90:43: error: ‘PyUnicodeObject’ has no member named ‘str’
 while (*(inp) || in->length > inp - in->str) {
   ^
genshi/_speedups.c:120:13: error: ‘PyUnicodeObject’ has no member named
‘str’
 inp = in->str;
 ^
...

a looong list of missing PyUnicodeObject attributes follows

I managed to build with -K, I cded to the /tmp/build-folder and retried to
build

And this is it
...
running build_ext
building 'genshi._speedups' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3
-Wall -Wstrict-prototypes -fPIC
-I/gnu/store/alk9r3rir93pjmv8im20f8xrvv90219z-python-3.5.2/include/python3.5m
-c genshi/_speedups.c -o build/temp.linux-x86_64-3.5/genshi/_speedups.o
genshi/_speedups.c: In function ‘escape’:
genshi/_speedups.c:89:13: error: ‘PyUnicodeObject’ has no member named ‘str’
 inp = in->str;
 ^
genshi/_speedups.c:90:24: error: ‘PyUnicodeObject’ has no member named
‘length’
 while (*(inp) || in->length > inp - in->str) {
...

Am I missing anything or is Genshi at faut ?