]> sigrok.org Git - libsigrok.git/commitdiff
setup.py: Do VPATH search for swig/enums.i
authorDaniel Elstner <redacted>
Sat, 15 Aug 2015 17:43:29 +0000 (19:43 +0200)
committerDaniel Elstner <redacted>
Sun, 16 Aug 2015 16:28:13 +0000 (18:28 +0200)
Also, in swig/classes.i include swig/enums.i rather than plain
enums.i, to guard against future name clashes.

Makefile.am
bindings/python/setup.py
bindings/swig/classes.i

index 3cbc570ae6f1565d0ae668cec4f95f06396c953f..665622e3a6a490bc385e88c42dde65f79cf049ca 100644 (file)
@@ -611,7 +611,7 @@ $(JCXX): $(JSWG) $(JDOC) bindings/swig/classes.i bindings/swig/enums.i \
                $(library_include_HEADERS) $(nodist_library_include_HEADERS)
        $(AM_V_at)make java-clean
        $(AM_V_GEN)swig -c++ -java -package org.sigrok.core.classes \
-               $(local_includes) -I$(JCLS) -I. -I$(srcdir) -outdir $(JCLS) -o $@ $<
+               -Ibindings -I$(JCLS) $(local_includes) -I$(srcdir) -outdir $(JCLS) -o $@ $<
 
 $(JJAR): $(JCXX)
        $(AM_V_GEN)$(JAVAC) -sourcepath $(JDIR) -d $(JDIR) $(JSRC)
index b22a6e9bf50b6499037acd01a4ad73ebea37bfe2..35b113abc4b7febade3ea5db5b2e229478b79f2a 100644 (file)
@@ -35,7 +35,7 @@ sr_includes, sr_lib_dirs, sr_libs, (sr_version,) = [
 
 includes = ['../../include', '../cxx/include']
 includes += [os.path.join(srcdir, path) for path in includes]
-includes += ['../..', '../../include/libsigrok', '../cxx/include/libsigrokcxx']
+includes += ['../..']
 includes += [i[2:] for i in sr_includes]
 includes += [np.get_include(), ]
 libdirs = ['../../.libs', '../cxx/.libs'] + [l[2:] for l in sr_lib_dirs]
@@ -77,7 +77,8 @@ setup(
     ext_modules = [
         Extension('sigrok.core._classes',
             sources = [vpath('sigrok/core/classes.i')],
-            swig_opts = ['-c++', '-threads', '-Isigrok/core'] + 
+            swig_opts = ['-c++', '-threads', '-Isigrok/core',
+                         '-I..', '-I%s' % os.path.join(srcdir, '..')] +
                 ['-I%s' % i for i in includes],
             extra_compile_args = ['-std=c++11', '-Wno-uninitialized'],
             include_dirs = includes,
index 6323fab114d069862f48d37fa9884a98a666fa52..b6ddbbcad261d131c657d309f88c14add22f25e7 100644 (file)
@@ -273,7 +273,7 @@ typedef std::map<const sigrok::ConfigKey *, Glib::VariantBase>
 
 %include <libsigrokcxx/libsigrokcxx.hpp>
 
-%include "enums.i"
+%include "swig/enums.i"
 
 namespace sigrok {
 %include <libsigrokcxx/enums.hpp>