summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-07-30 11:27:01 +0300
committerSergey Poznyakoff <gray@gnu.org>2018-07-30 12:19:29 +0300
commit9d702d09a8cdf3635a6cb33219bb1ea96e826d27 (patch)
treecf435e317df59791854d47aeab0f7b9a2d70d4dc /lib
parent62666075e3c7276d308dffef42c7c50dc526925b (diff)
downloadmailutils-9d702d09a8cdf3635a6cb33219bb1ea96e826d27.tar.gz
mailutils-9d702d09a8cdf3635a6cb33219bb1ea96e826d27.tar.bz2
Support for Python 3
Support for v2 is retained for a while. Both the API and the syntax of the two versions differ considerably enough to keep both versions apart in parallel directory subtrees, instead of fiddling with CPP directives and Automake conditionals. So, instead of prior 'python/' and 'examples/python' we now have 'python/2', 'python/3', and 'examples/python/2' with 'examples/python/3'. The customized loader is modified to insert the appropriate path to the sys.path. When Python 2 is definitely gone, the directory structures will be flattened again, by removing additional version number subdirectory. * Makefile.am (SUBDIRS): Add python unconditionally * configure.ac (PYTHON_MAJOR): New substvar. (MU_LIB_PY): Change path (MU_COND_PYTHON2,MU_COND_PYTHON3): New conditionals. * examples/python/*: Rename to examples/python/2/* * examples/python/3/Makefile.am: New file. * examples/python/3/addr.py: New file. * examples/python/3/auth.py: New file. * examples/python/3/iconv.py: New file. * examples/python/3/lsf.py: New file. * examples/python/3/mailcap.py: New file. * examples/python/3/mimetest.py: New file. * examples/python/3/msg-send.py: New file. * examples/python/3/sfrom.py: New file. * examples/python/3/url-parse.py: New file. * include/mailutils/python.h: Remove inclusion of Python.h. It must included before all other files. * lib/python.c: Include Python.h * python/*: Rename to python/2/* * python/usercustomize.py: Insert path to the appropriate Python version implementation to the sys.path * python/3/Makefile.am: New file. * python/3/libmu_py/Makefile.am: New file. * python/3/libmu_py/address.c: New file. * python/3/libmu_py/attribute.c: New file. * python/3/libmu_py/auth.c: New file. * python/3/libmu_py/body.c: New file. * python/3/libmu_py/envelope.c: New file. * python/3/libmu_py/errno.c: New file. * python/3/libmu_py/error.c: New file. * python/3/libmu_py/filter.c: New file. * python/3/libmu_py/folder.c: New file. * python/3/libmu_py/header.c: New file. * python/3/libmu_py/libmu_py.c: New file. * python/3/libmu_py/libmu_py.h: New file. * python/3/libmu_py/list.c: New file. * python/3/libmu_py/mailbox.c: New file. * python/3/libmu_py/mailcap.c: New file. * python/3/libmu_py/mailer.c: New file. * python/3/libmu_py/message.c: New file. * python/3/libmu_py/mime.c: New file. * python/3/libmu_py/nls.c: New file. * python/3/libmu_py/registrar.c: New file. * python/3/libmu_py/script.c: New file. * python/3/libmu_py/secret.c: New file. * python/3/libmu_py/sieve.c: New file. * python/3/libmu_py/stream.c: New file. * python/3/libmu_py/url.c: New file. * python/3/libmu_py/util.c: New file. * python/3/mailutils/Makefile.am: New file. * python/3/mailutils/__init__.py: New file. * python/3/mailutils/address.py: New file. * python/3/mailutils/attribute.py: New file. * python/3/mailutils/auth.py: New file. * python/3/mailutils/body.py: New file. * python/3/mailutils/c_api.c: New file. * python/3/mailutils/envelope.py: New file. * python/3/mailutils/error.py: New file. * python/3/mailutils/filter.py: New file. * python/3/mailutils/folder.py: New file. * python/3/mailutils/header.py: New file. * python/3/mailutils/mailbox.py: New file. * python/3/mailutils/mailcap.py: New file. * python/3/mailutils/mailer.py: New file. * python/3/mailutils/message.py: New file. * python/3/mailutils/mime.py: New file. * python/3/mailutils/nls.py: New file. * python/3/mailutils/registrar.py: New file. * python/3/mailutils/secret.py: New file. * python/3/mailutils/sieve.py: New file. * python/3/mailutils/stream.py: New file. * python/3/mailutils/url.py: New file. * python/3/mailutils/util.py: New file.
Diffstat (limited to 'lib')
-rw-r--r--lib/python.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/python.c b/lib/python.c
index 4be391d34..e809431f0 100644
--- a/lib/python.c
+++ b/lib/python.c
@@ -17,10 +17,11 @@
#if defined(HAVE_CONFIG_H)
# include <config.h>
#endif
+#include <Python.h>
#include "muscript.h"
#include "muscript_priv.h"
-#include <mailutils/python.h>
#include <string.h>
+#include <mailutils/python.h>
static int
python_init (const char *prog, const char **env, mu_script_descr_t *pdescr)

Return to:

Send suggestions and report system problems to the System administrator.