[pytango] 351/483: Better handling of third-party libraries

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.

commit 7d983c85f9a459930e1f66404cbe912ede2db8f5
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date:   Wed Feb 5 13:11:33 2014 +0000

    Better handling of third-party libraries
    
    git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@24838 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
 setup.py | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/setup.py b/setup.py
index 95e2efb..98ffe99 100644
--- a/setup.py
+++ b/setup.py
@@ -54,10 +54,12 @@ is64 = 8 * struct.calcsize("P") == 64
 
 
 def pkg_config(*packages, **config):
-    config_map = {"-I": "include_dirs",
-                "-L": "library_dirs",
-                "-l": "libraries"}
-    cmd = ["pkg-config", "--libs", "--cflags-only-I", " ".join(packages)]
+    config_map = {
+        "-I": "include_dirs",
+        "-L": "library_dirs",
+        "-l": "libraries",
+    }
+    cmd = ["pkg-config", "--cflags-only-I", " ".join(packages)]
     proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
     result = proc.wait()
     result = str(proc.communicate()[0].decode("utf-8"))
@@ -157,18 +159,20 @@ def add_lib(name, dirs, sys_libs, env_name=None, lib_name=None, inc_suffix=None)
         return
     else:
         inc_dir = os.path.join(ENV, 'include')
+        dirs['include_dirs'].append(inc_dir)
         if inc_suffix is not None:
             inc_dir = os.path.join(inc_dir, inc_suffix)
+            dirs['include_dirs'].append(inc_dir)
+
         lib_dirs = [os.path.join(ENV, 'lib')]
         if is64:
             lib64_dir = os.path.join(ENV, 'lib64')
             if os.path.isdir(lib64_dir):
                 lib_dirs.insert(0, lib64_dir)
-
+        dirs['library_dirs'].extend(lib_dirs)
+        
         if lib_name.startswith('lib'):
             lib_name = lib_name[3:]
-        dirs['include_dirs'].append(inc_dir)
-        dirs['library_dirs'].extend(lib_dirs)
         dirs['libraries'].append(lib_name)
 
 
@@ -333,8 +337,7 @@ def setup_args():
     directories = {
         'include_dirs': [],
         'library_dirs': [],
-        'libraries':    ['tango', 'log4tango', 'zmq',
-                         'omniDynamic4', 'COS4', 'omniORB4', 'omnithread'],
+        'libraries':    ['tango'],
     }
     sys_libs = []
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list