]> sigrok.org Git - libsigrok.git/commitdiff
python: Use --cflags-only-I to get includes in setup.py.
authorMartin Ling <redacted>
Fri, 19 Apr 2013 16:30:44 +0000 (17:30 +0100)
committerMartin Ling <redacted>
Fri, 19 Apr 2013 16:30:44 +0000 (17:30 +0100)
bindings/python/setup.py

index 6c23efff30e50619b2de569c96618280fcb11510..0a266d80b1c9e8e00889f45587f7a6245db8b3aa 100644 (file)
@@ -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')]
         )