|
From: Ryan R. <rya...@gm...> - 2009-11-05 10:36:53
|
Hi Gustavo,
Thanks for the response.
Gustavo Sverzut Barbieri wrote:
> Hi Ryan,
>
> You definitely do not need these hacks. For instance, I have
> PKG_CONFIG_PATH with dependencies set to my home folder, and it does
> work... maybe you forgot to export PKG_CONFIG_PATH yourself? Python,
> being a child process of your shell, should inherit those and then
> give it to its children as well.
>
It was my fault. When installing to /usr/local, one has to run
sudo ./build-all.sh --prefix=/usr/local
BUT... When the sudo is invoked, the PKG_CONFIG_PATH is overwritten. So,
it needs to be
sudo -E ./build-all.sh --prefix=/usr/local
which preserves the previous environment. So i learned something :)
> As for sudo in build.sh, sorry. This script is meant to help users
> installing, specially in their home folders. If you want you can run
> "sudo ./build.sh" or even run setup.py manually, using --root= option
> and then copying it over the final destination (just like automake
> DESTDIR).
>
I guess i got confused with the PYTHONPATH variable and how it is used
with the site packages.
> I just submitted new scripts that try to improve usage, let me know if
> you find them useful.
>
Thanks,
Ryan
> BR,
>
> On Tue, Nov 3, 2009 at 10:42 AM, Ryan Raasch <rya...@gm...> wrote:
>> Hello,
>>
>> I have been trying and finally succeeded in building the python bindings
>> ( in directory ./BINDINGS/python). However, there were issues. Keep in
>> mind, however, i am not that great with python, ie haven't used it very
>> much :)
>>
>> Any help/information appreciated :)
>>
>> 1.
>> Even when the environment exports PKG_CONFIG_PATH
>> (/opt/e17/lib/pkgconfig in my case), the setup.py in each directory
>> cannot find the .pc files. So i made a hack, which i know is not python
>> correct and static.
>>
>> ****** For each python-*/setup.py
>>
>> diff --git a/BINDINGS/python/python-e_dbus/setup.py
>> b/BINDINGS/python/python-e_dbus/setup.py
>> index a26db9b..33d1b95 100644
>> --- a/BINDINGS/python/python-e_dbus/setup.py
>> +++ b/BINDINGS/python/python-e_dbus/setup.py
>> @@ -10,7 +10,7 @@ import shlex
>>
>> def getstatusoutput(cmdline):
>> cmd = shlex.split(cmdline)
>> - p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
>> + p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
>> env={"PKG_CONFIG_PATH":"/opt/e17/lib/pkgconfig"})
>> out, err = p.communicate()
>> return p.returncode, out
>>
>> 2.
>> After getting the correct PKG_CONFIG stuff, then the following leads to
>> the following error,
>>
>> Checking .pth file support in /usr/local/lib/python2.6/site-packages
>> /usr/bin/python -E -c pass
>> TEST FAILED: /usr/local/lib/python2.6/site-packages does NOT support
>> .pth files
>> error: bad install directory or PYTHONPATH
>>
>>
>> So another hack, which bypasses the sub directories' build.sh script.
>>
>>
>> diff --git a/BINDINGS/python/build-all.sh b/BINDINGS/python/build-all.sh
>> index d61707e..5e6902e 100755
>> --- a/BINDINGS/python/build-all.sh
>> +++ b/BINDINGS/python/build-all.sh
>> @@ -12,5 +12,6 @@ echo "Install to $PREFIX"
>> CWD=$PWD
>> for m in evas ecore edje emotion e_dbus ethumb elementary efl_utils; do
>> cd $CWD/python-$m || die "cd python-$m"
>> - ./build.sh --force $PREFIX || die "failed to build python-$m"
>> + sudo /usr/bin/python setup.py develop install_headers
>> + #./build.sh --force $PREFIX || die "failed to build python-$m"
>> done
>>
>>
>> 3.
>> Last, but not least, elementary setup.py is different than the others,
>> why? So another hack is needed.
>>
>> diff --git a/BINDINGS/python/python-elementary/setup.py
>> b/BINDINGS/python/python-elementary/setup.py
>> index 7e2918a..81644bb 100644
>> --- a/BINDINGS/python/python-elementary/setup.py
>> +++ b/BINDINGS/python/python-elementary/setup.py
>> @@ -30,7 +30,7 @@ class elementary_build_ext(build_ext):
>> def pkgconfig(*packages, **kw):
>> flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l':
>> 'libraries'}
>> pkgs = ' '.join(packages)
>> - cmdline = 'pkg-config --libs --cflags %s' % pkgs
>> + cmdline = 'export PKG_CONFIG_PATH=/opt/e17/lib/pkgconfig &&
>> pkg-config --libs --cflags %s' % pkgs
>>
>> status, output = commands.getstatusoutput(cmdline)
>> if status != 0:
>>
>>
>> Thanks,
>> Ryan
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> enlightenment-devel mailing list
>> enl...@li...
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>
>
>
|