From e54f5f3dc8ec281bbc17e4092d168ea32ae099d7 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 22 Oct 2019 16:04:30 +0300 Subject: Python: fixing build for Python 3.8. Thanks to tonyafanasyev. This is related to #331 issue on GitHub. --- auto/modules/python | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'auto/modules/python') diff --git a/auto/modules/python b/auto/modules/python index abd145c9..ecf8802a 100644 --- a/auto/modules/python +++ b/auto/modules/python @@ -64,6 +64,10 @@ nxt_found=no if /bin/sh -c "$NXT_PYTHON_CONFIG --prefix" >> $NXT_AUTOCONF_ERR 2>&1; then + if ${NXT_PYTHON_CONFIG} --embed 2>/dev/null; then + NXT_PYTHON_CONFIG="${NXT_PYTHON_CONFIG} --embed" + fi + NXT_PYTHON_INCLUDE=`${NXT_PYTHON_CONFIG} --includes` NXT_PYTHON_LIBS=`${NXT_PYTHON_CONFIG} --ldflags` -- cgit From ad518ae6c491308351eaa0d4065c09870d56f9ae Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Wed, 23 Oct 2019 14:04:29 +0300 Subject: Python: fixing Python 3.8 build with clang. Python 3.8 has 'tp_print' field in PyTypeObject struct. This field is attributed as deprecated. So, clang generates warning (which is turned to error) as a result of initializing this field. From the other hand, it is impossible to omit this field in positional initialization. The solution is to use designated initializer. Silencing usage message during configure python. This is related to #331 issue on GitHub. --- 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 ecf8802a..6c8198f5 100644 --- a/auto/modules/python +++ b/auto/modules/python @@ -64,7 +64,7 @@ nxt_found=no if /bin/sh -c "$NXT_PYTHON_CONFIG --prefix" >> $NXT_AUTOCONF_ERR 2>&1; then - if ${NXT_PYTHON_CONFIG} --embed 2>/dev/null; then + if ${NXT_PYTHON_CONFIG} --embed >/dev/null 2>&1; then NXT_PYTHON_CONFIG="${NXT_PYTHON_CONFIG} --embed" fi -- cgit