From a29babd07cf9f9625d2b5aa2eb6b7bc9d1828359 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Wed, 11 May 2016 11:42:00 +0200 Subject: python: Integrate into the build system. * configure.ac: Make Python bindings configurable, add new Makefile. * lang/python/Makefile.am: New file. * lang/python/setup.py: Integrate into the build system. * m4/ax_pkg_swig.m4: New file from the autoconf archive. * m4/m4_ax_swig_python.m4: Likewise. Signed-off-by: Justus Winter --- configure.ac | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 55c388eb..96df0598 100644 --- a/configure.ac +++ b/configure.ac @@ -587,6 +587,32 @@ AC_SUBST(emacs_local_vars_begin, [['Local][ ][Variables:']]) AC_SUBST(emacs_local_vars_read_only, ['buffer-read-only: t']) AC_SUBST(emacs_local_vars_end, ['End:']) +# Bindings. +AC_ARG_ENABLE([python], + AC_HELP_STRING([--enable-python], + [build the Python3 bindings]), + [enable_python=$enableval], + [enable_python=auto]) +AX_PKG_SWIG +if test -z "$SWIG"; then + if test $enable_python = yes; then + die=yes + AC_MSG_NOTICE([[ +*** +*** You need SWIG to build the Python bindings. +***]]) + else + enable_python=no + fi +else + if test $enable_python = auto; then + enable_python=yes + fi +fi +if test $enable_python = yes; then + AM_PATH_PYTHON([3.2]) + AX_SWIG_PYTHON +fi # Last check. die=no @@ -632,7 +658,8 @@ AC_CONFIG_FILES(Makefile src/Makefile src/versioninfo.rc src/gpgme.h) AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config) -AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd]) +AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd + lang/python/Makefile]) AC_OUTPUT echo " @@ -644,6 +671,8 @@ echo " UI Server: $uiserver FD Passing: $use_descriptor_passing GPGME Pthread: $have_pthread + + Python bindings: $enable_python " if test "x${gpg_config_script_warn}" != x; then cat < Date: Thu, 12 May 2016 15:27:50 +0200 Subject: python: Add a test suite. * configure.ac: Add new Makefile. * lang/python/Makefile.am: Add subdirectory. * lang/python/tests/Makefile.am: New file. * lang/python/tests/t-wrapper.py: Likewise. Signed-off-by: Justus Winter --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 96df0598..e2b40298 100644 --- a/configure.ac +++ b/configure.ac @@ -659,7 +659,7 @@ AC_CONFIG_FILES(Makefile src/Makefile src/gpgme.h) AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config) AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd - lang/python/Makefile]) + lang/python/Makefile lang/python/tests/Makefile]) AC_OUTPUT echo " -- cgit v1.2.3