Commit Graph

22 Commits

Author SHA1 Message Date
Daniel Elstner 8ebf1469a9 build: Use common SWIG defines for Python and Java
Make the Python and Java bindings use the same set of preprocessor
macros for the SWIG parsing stage, taken from a make variable. Add
G_GNUC_{BEGIN,END}_IGNORE_DEPRECATIONS to that set.
2015-10-30 12:51:16 +01:00
Daniel Elstner 4c9208a799 SWIG: Hack around SWIG segfault on private destructors
Apparently this problem has been fixed in SWIG 3.0.6. However,
until we can require that version, define "private" as "protected"
when running the SWIG parser.
2015-10-26 06:45:56 +01:00
Daniel Elstner c6e18e007a SWIG: Define "noexcept" empty to work around SWIG bug
The SWIG 2.0.12 on my system bails out with a syntax error on the
"noexcept" keyword in C++11 code. Define "noexcept" to nothing (for
the SWIG parser only) to work around this problem.
2015-10-26 06:45:56 +01:00
Daniel Elstner c05a0ba528 Build: Pass compiler flags from make to setup.py
Extend setup.py to allow environment variables to be set on the
command line. Use that functionality to replace the pkg-config
invocations with flags passed on from make. Suppress the annoying
-Wstrict-prototypes warning by overriding the OPT variable.

Also move the "cd bindings/python" from Makefile.am to setup.py
to side-step problems with "cd" in make rules.

This also fixes bug #628.
2015-08-29 17:08:34 +02:00
Daniel Elstner 5a3e34285d setup.py: Do VPATH search for swig/enums.i
Also, in swig/classes.i include swig/enums.i rather than plain
enums.i, to guard against future name clashes.
2015-08-16 18:28:13 +02:00
Uwe Hermann 161dc24d84 cxx: Rename include/libsigrok/ to include/libsigrokcxx/. 2015-01-17 20:26:14 +01:00
Uwe Hermann 52ff4f6a04 Rename libsigrokxx to the more common libsigrokcxx. 2015-01-17 18:52:43 +01:00
Jiří Pinkava cd5623ca86 fix numpy include path 2014-12-29 23:34:42 +01:00
Uwe Hermann 5fcc5909cc python: Silence some warnings via -Wno-uninitialized.
Silence some warnings when building the Python bindings:

  sigrok/core/classes_wrap.cpp: In function ‘PyObject* _wrap_new_OutputFormatMap(PyObject*, PyObject*)’:
  sigrok/core/classes_wrap.cpp:5232:4: warning: ‘argv[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      res = SWIG_ConvertPtr(obj,(void**)&p,swig::type_info<map_type>(),0);
      ^
  sigrok/core/classes_wrap.cpp:14383:13: note: ‘argv[0]’ was declared here
     PyObject *argv[2];
               ^
  sigrok/core/classes_wrap.cpp: In function ‘PyObject* _wrap_new_ChannelGroupMap(PyObject*, PyObject*)’:
  sigrok/core/classes_wrap.cpp:5232:4: warning: ‘argv[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      res = SWIG_ConvertPtr(obj,(void**)&p,swig::type_info<map_type>(),0);
      ^
  sigrok/core/classes_wrap.cpp:23356:13: note: ‘argv[0]’ was declared here
     PyObject *argv[2];
               ^

We add -Wno-uninitialized since the warnings are harmless and we really
don't care about them in the generated classes_wrap.cpp.

This fixes parts of #417.
2014-11-22 22:06:02 +01:00
Marcus Comstedt 0e1a7fe91a Makefile.am: Fix out-of-tree build for Python bindings 2014-08-17 16:05:46 +02:00
Bert Vermeulen 9ae3eb121f python: Don't install as a zip file. 2014-07-19 22:25:39 +02:00
Martin Ling f0f1d90d9c Remove obsolete low-level language bindings. 2014-07-18 21:34:57 +01:00
Martin Ling f774095496 Reimplement high-level Python bindings on top of SWIG/C++ bindings. 2014-07-18 20:47:10 +01:00
Uwe Hermann 50985c2019 GPL headers: Use correct project name. 2013-04-23 22:24:30 +02:00
Martin Ling 91bea31f6b python: unify pkg-config calls in setup.py. 2013-04-19 17:41:44 +01:00
Martin Ling 0cd466ccd8 python: Use --cflags-only-I to get includes in setup.py. 2013-04-19 17:30:44 +01:00
Martin Ling cccb599147 python: Release GIL during libsigrok calls. 2013-04-17 14:01:19 +01:00
Martin Ling 0220626994 python: use setuptools and put bindings into sigrok.core.lowlevel. 2013-04-17 03:50:27 +01:00
Uwe Hermann 9bb2f327a9 Python bindings: Small fix for Python 3 support. 2013-04-16 22:35:17 +02:00
Uwe Hermann f02121f8d2 Python bindings: Fix reported libsigrok version.
Use 'pkg-config --modversion libsigrok' to get the libsigrok package
version. 'pkg-config --version libsigrok' ignores the argument and just
reports the version of pkg-config itself.
2013-04-16 00:58:29 +02:00
Uwe Hermann 8dc93c841f Python bindings: Cosmetics. 2013-04-16 00:57:25 +02:00
Martin Ling 758b01adcb Add SWIG interface file and build script for Python bindings. 2013-04-16 00:41:11 +02:00