<div dir="ltr"><div>Oh interesting! osbuild is actually using a virtualenv. I suspect it doesn't work because we are not activating it but just running the python executable in the virtualenv. So osbuild is using the virtualenv python, but the child processes are not. Now if I could remember why we are not activating the virtualenv... :)<br>
<br></div>Still I think the cleanest solution is to make sugar-base require python2 explicitly. It will also work if you are building archlinux (or gentoo) packages.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 10 March 2014 01:14, S. Daniel Francis <span dir="ltr"><<a href="mailto:francis@sugarlabs.org" target="_blank">francis@sugarlabs.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
All Arch Linux users I met usually solve this problem when developing<br>
by using virtualenv.<br>
<br>
2014-03-09 20:54 GMT-03:00 Daniel Narvaez <<a href="mailto:dwnarvaez@gmail.com">dwnarvaez@gmail.com</a>>:<br>
<div class="HOEnZb"><div class="h5">> On 10 March 2014 00:46, Daniel Narvaez <<a href="mailto:dwnarvaez@gmail.com">dwnarvaez@gmail.com</a>> wrote:<br>
>><br>
>> On 10 March 2014 00:07, Gonzalo Odiard <<a href="mailto:godiard@sugarlabs.org">godiard@sugarlabs.org</a>> wrote:<br>
>>>><br>
>>>><br>
>>>> Then issues ocurred with gwebsockets. It persistently tried to use<br>
>>>> python3.3, my system's default, instead of python2.7. Finally I found the<br>
>>>> culprit, in<br>
>>>> ./out/sandbox/install/lib/python2.7/site-packages/osbuild/build.py I<br>
>>>> replaced in line 190 one instance of "python" for "python2.7" and it worked<br>
>>>> after that.<br>
>>>><br>
>>>> Finally when building sugar-base I had to set up the environment<br>
>>>> variable PYTHON=/usr/bin/python2.7 in order for it to build.<br>
>>>> Also, when building sugar, I had to manually create the directory<br>
>>>> "./out/install/etc/gconf/" or it would fail to install<br>
>>>><br>
>>><br>
>>> Maybe you can solve this issues just creating symlinks like in fedora:<br>
>>><br>
>>> [gonzalo@localhost develop-activity]$ ls -l /bin/python<br>
>>> lrwxrwxrwx. 1 root root 7 Jan 9 2013 /bin/python -> python2<br>
>>><br>
>>> [gonzalo@localhost develop-activity]$ ls -l /bin/python2<br>
>>> lrwxrwxrwx. 1 root root 9 Jan 9 2013 /bin/python2 -> python2.7<br>
>>><br>
>>> Gonzalo<br>
>><br>
>><br>
>> I think archlinux has those symlinks already, but it also has "python"<br>
>> which is reallly python 3.<br>
>> Now honestly I think that's a very bad decision archlinux made (and the<br>
>> reason I'm not using it anymore, fwiw, it's a real pain if you are compiling<br>
>> stuff a lot).<br>
>> But it is compatible with best practices suggested by the python<br>
>> documentation. So I think we should follow those practices in sugar-base<br>
>> (i.e. explicitly require python2), which will take care of this issue. We<br>
>> are already doing that in the gtk3 modules.<br>
><br>
><br>
> Oh missed the /bin/python -> python2 suggestion. That would break archlinux<br>
> stuff which assumes python is python3.<br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> Sugar-devel mailing list<br>
> <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Daniel Narvaez<br>
</div>