aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schink <swo-dev@marcschink.de>2019-09-07 21:14:30 +0200
committerMarc Schink <swo-dev@marcschink.de>2019-09-07 21:48:47 +0200
commit296e9277899a5df794f854af79163c0f59cfe830 (patch)
treef3acdafedbebab9ecbe2b90ca625b571ba4042fe
parentedbc5903dbed3c4f1568cb2aab9afab7eea14140 (diff)
Drop Python 2 support
Signed-off-by: Marc Schink <swo-dev@marcschink.de>
-rw-r--r--README2
-rw-r--r--bindings/python/swopy.i5
-rw-r--r--configure.ac2
-rw-r--r--examples/decoder.py2
4 files changed, 3 insertions, 8 deletions
diff --git a/README b/README
index a2fbea7..48f2144 100644
--- a/README
+++ b/README
@@ -32,7 +32,7 @@ Requirements for the C++ bindings:
Requirements for the Python bindings:
- libswocxx >= 0.1.0 (libswo C++ bindings, see above)
- - Python >= 2.7 or Python >= 3.2
+ - Python >= 3.2
- Python setuptools
- SWIG >= 3.0.3
diff --git a/bindings/python/swopy.i b/bindings/python/swopy.i
index eaa38be..6a7b5bf 100644
--- a/bindings/python/swopy.i
+++ b/bindings/python/swopy.i
@@ -71,10 +71,7 @@ static int swig_exception_code(int code)
%pybuffer_binary(const uint8_t *data, size_t length)
void libswo::Context::feed(const uint8_t *data, size_t length);
-/*
- * Map from std::vector<uint8_t> to Python bytes object for Python version 3
- * and to Python string object for Python version >= 2.6.
- */
+/* Map from std::vector<uint8_t> to Python bytes object. */
%typemap(out) std::vector<uint8_t> {
const char *dummy;
const std::vector<uint8_t> &tmp = $1;
diff --git a/configure.ac b/configure.ac
index 0cf25db..b550400 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,7 +68,7 @@ AC_SUBST([AM_LIBTOOLFLAGS], "--silent")
AC_CHECK_PROGS([SWIG], [swig swig3.0])
# Check for Python interpreter.
-AM_PATH_PYTHON([2.7], [HAVE_PYTHON="yes"], [HAVE_PYTHON="no"])
+AM_PATH_PYTHON([3.2], [HAVE_PYTHON="yes"], [HAVE_PYTHON="no"])
# Check for Python development files.
AC_MSG_CHECKING([for Python development files])
diff --git a/examples/decoder.py b/examples/decoder.py
index 2416a2e..64f0af5 100644
--- a/examples/decoder.py
+++ b/examples/decoder.py
@@ -17,8 +17,6 @@
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##
-from __future__ import print_function
-
import sys
import swopy