From b65a8636bb5b2ee61c69660aa6f7edc7d909e632 Mon Sep 17 00:00:00 2001 From: Tiago Natel de Moura Date: Tue, 25 Aug 2020 15:25:51 +0100 Subject: Isolation: added "automount" option. Now it's possible to disable default bind mounts of languages by setting: { "isolation": { "automount": { "language_deps": false } } } In this case, the user is responsible to provide a "rootfs" containing the language libraries and required files for the application. --- auto/modules/python | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'auto/modules/python') diff --git a/auto/modules/python b/auto/modules/python index c14bf7e0..58d8f66f 100644 --- a/auto/modules/python +++ b/auto/modules/python @@ -138,7 +138,7 @@ pyver = "python" + str(sys.version_info[0]) + "." + str(sys.version_info[1]) print("static const nxt_fs_mount_t nxt_python_mounts[] = {") -pattern = "{(u_char *) \"%s\", (u_char *) \"%s\", (u_char *) \"bind\", NXT_MS_BIND|NXT_MS_REC, NULL}," +pattern = "{(u_char *) \"%s\", (u_char *) \"%s\", (u_char *) \"bind\", NXT_MS_BIND|NXT_MS_REC, NULL, 1}," base = None for p in sys.path: if len(p) > 0: -- cgit From d483aa74e61af411e40e98153a597d5a0473e2f1 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Mon, 14 Sep 2020 12:07:30 +0300 Subject: Python: source file moved to 'python' sub-directory. No functional changes. Get ready for an increase in file number. --- auto/modules/python | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'auto/modules/python') diff --git a/auto/modules/python b/auto/modules/python index 58d8f66f..0e80d93f 100644 --- a/auto/modules/python +++ b/auto/modules/python @@ -167,7 +167,7 @@ $echo " + Python module: ${NXT_PYTHON_MODULE}.unit.so" $echo >> $NXT_MAKEFILE NXT_PYTHON_MODULE_SRCS=" \ - src/nxt_python_wsgi.c \ + src/python/nxt_python_wsgi.c \ " # The python module object files. @@ -185,6 +185,7 @@ for nxt_src in $NXT_PYTHON_MODULE_SRCS; do cat << END >> $NXT_MAKEFILE $NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H + mkdir -p $NXT_BUILD_DIR/src/python \$(CC) -c \$(CFLAGS) -DNXT_PYTHON_MOUNTS_H=\"$NXT_PYTHON_MOUNTS_HEADER\" \\ \$(NXT_INCS) $NXT_PYTHON_INCLUDE \\ $nxt_dep_flags \\ -- cgit From d94dac091f6a6878f10cfc8fa1ef059dd6bfe964 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Mon, 14 Sep 2020 13:27:02 +0300 Subject: Python: split module initialization from WSGI implementation. This is required for futher ASGI implementation. --- auto/modules/python | 1 + 1 file changed, 1 insertion(+) (limited to 'auto/modules/python') diff --git a/auto/modules/python b/auto/modules/python index 0e80d93f..afb1b586 100644 --- a/auto/modules/python +++ b/auto/modules/python @@ -167,6 +167,7 @@ $echo " + Python module: ${NXT_PYTHON_MODULE}.unit.so" $echo >> $NXT_MAKEFILE NXT_PYTHON_MODULE_SRCS=" \ + src/python/nxt_python.c \ src/python/nxt_python_wsgi.c \ " -- cgit From c4c2f90c5b532c1ec283d211e0fd50e4538c2a51 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Thu, 1 Oct 2020 23:55:23 +0300 Subject: Python: ASGI server introduced. This closes #461 issue on GitHub. --- auto/modules/python | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'auto/modules/python') diff --git a/auto/modules/python b/auto/modules/python index afb1b586..48f6e5ef 100644 --- a/auto/modules/python +++ b/auto/modules/python @@ -168,6 +168,11 @@ $echo >> $NXT_MAKEFILE NXT_PYTHON_MODULE_SRCS=" \ src/python/nxt_python.c \ + src/python/nxt_python_asgi.c \ + src/python/nxt_python_asgi_http.c \ + src/python/nxt_python_asgi_lifespan.c \ + src/python/nxt_python_asgi_str.c \ + src/python/nxt_python_asgi_websocket.c \ src/python/nxt_python_wsgi.c \ " -- cgit