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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to