From: Martin Ling Date: Fri, 19 Apr 2013 16:30:44 +0000 (+0100) Subject: python: Use --cflags-only-I to get includes in setup.py. X-Git-Tag: dsupstream~97 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0cd466ccd8f1149883f535868650d4236d0b7ab4;p=libsigrok.git python: Use --cflags-only-I to get includes in setup.py. --- diff --git a/bindings/python/setup.py b/bindings/python/setup.py index 6c23efff..0a266d80 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -21,7 +21,7 @@ from setuptools import setup, find_packages, Extension import subprocess sr_includes = subprocess.check_output( - ["pkg-config", "--cflags", "libsigrok"]).rstrip().decode().split(' ') + ["pkg-config", "--cflags-only-I", "libsigrok"]).rstrip().decode().split(' ') sr_libs = subprocess.check_output( ["pkg-config", "--libs", "libsigrok"]).rstrip().decode().split(' ') @@ -39,7 +39,7 @@ setup( Extension('sigrok.core._lowlevel', sources = ['sigrok/core/lowlevel.i'], swig_opts = ['-threads'] + sr_includes, - include_dirs = [i[2:] for i in sr_includes if i.startswith('-I')], + include_dirs = [i[2:] for i in sr_includes], library_dirs = [l[2:] for l in sr_libs if l.startswith('-L')], libraries = [l[2:] for l in sr_libs if l.startswith('-l')] )