Pyolian: add support EOLIAN_SO_DIR env var
authorDave Andreoli <dave@gurumeditation.it>
Fri, 16 Mar 2018 19:00:49 +0000 (20:00 +0100)
committerWonki Kim <wonki_.kim@samsung.com>
Tue, 10 Apr 2018 11:21:58 +0000 (20:21 +0900)
Thanks goes to @lauromoura for proposing this in D5840

src/scripts/pyolian/README.md
src/scripts/pyolian/eolian_lib.py

index f803077..9ec4f20 100644 (file)
@@ -25,6 +25,10 @@ tree, usually at efl compilation time (before the install step).
 The only requirement is that **the source tree must be already built** (not
 installed) because pyolian search the eolian .so/.dll inside the source tree.
 
+If you built the efl tree in a custom location (fe, you build out-of-tree) you
+can tell pyolian where to find the built eolian .so files using the
+`EOLIAN_SO_DIR` environment variable.
+
 
 Command line usage
 ==================
index 99d862a..4b79265 100644 (file)
@@ -11,10 +11,13 @@ import os
 script_path = os.path.dirname(os.path.realpath(__file__))
 root_path = os.path.abspath(os.path.join(script_path, '..', '..', '..'))
 
-search_in = (
+search_in = [
     os.path.join(root_path, 'src', 'lib', 'eolian', '.libs'),
     os.path.join(root_path, 'build', 'src', 'lib', 'eolian'),
-)
+]
+
+if 'EOLIAN_SO_DIR' in os.environ:
+    search_in.insert(0, os.environ['EOLIAN_SO_DIR'])
 
 search_names = ('libeolian.so', 'eolian.dll')