diff options
author | Tiago Natel de Moura <t.nateldemoura@f5.com> | 2020-07-31 12:21:21 +0100 |
---|---|---|
committer | Tiago Natel de Moura <t.nateldemoura@f5.com> | 2020-07-31 12:21:21 +0100 |
commit | b28b4459b0899cb8357df5f6c1e904fd1a34ebe3 (patch) | |
tree | bdabea7bad1f2d04c420f2b6b84dc110c7c968ba /auto/modules/python | |
parent | f3471c29c0870cffff3d96c1c50c88c47a4d8009 (diff) | |
download | unit-b28b4459b0899cb8357df5f6c1e904fd1a34ebe3.tar.gz unit-b28b4459b0899cb8357df5f6c1e904fd1a34ebe3.tar.bz2 |
Isolation: fixed the generation of mounts table.
Since the introduction of rootfs feature, some language modules
can't be configured multiple times.
Now the configure generates a separate nxt_<module>_mounts.h for
each module compiled.
Diffstat (limited to '')
-rw-r--r-- | auto/modules/python | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/auto/modules/python b/auto/modules/python index ab314013..c14bf7e0 100644 --- a/auto/modules/python +++ b/auto/modules/python @@ -130,13 +130,13 @@ if grep ^$NXT_PYTHON_MODULE: $NXT_MAKEFILE 2>&1 > /dev/null; then fi -NXT_PYTHON_MOUNTS_HEADER=$NXT_BUILD_DIR/nxt_python_mounts.h +NXT_PYTHON_MOUNTS_HEADER=nxt_${NXT_PYTHON_MODULE}_mounts.h $NXT_PYTHON -c 'import os.path import sys pyver = "python" + str(sys.version_info[0]) + "." + str(sys.version_info[1]) -print("static const nxt_fs_mount_t nxt_python%d%d_mounts[] = {" % (sys.version_info[0], 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}," base = None @@ -157,7 +157,7 @@ for p in sys.path: print("};\n\n") -' >> $NXT_PYTHON_MOUNTS_HEADER +' > $NXT_BUILD_DIR/$NXT_PYTHON_MOUNTS_HEADER $echo " + Python module: ${NXT_PYTHON_MODULE}.unit.so" @@ -185,7 +185,8 @@ for nxt_src in $NXT_PYTHON_MODULE_SRCS; do cat << END >> $NXT_MAKEFILE $NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H - \$(CC) -c \$(CFLAGS) \$(NXT_INCS) $NXT_PYTHON_INCLUDE \\ + \$(CC) -c \$(CFLAGS) -DNXT_PYTHON_MOUNTS_H=\"$NXT_PYTHON_MOUNTS_HEADER\" \\ + \$(NXT_INCS) $NXT_PYTHON_INCLUDE \\ $nxt_dep_flags \\ -o $NXT_BUILD_DIR/$nxt_obj $nxt_src $nxt_dep_post |