blob: 7ab29857c1175b492ec881fe70c9d283923bd354 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# Copyright (C) Valentin V. Bartenev
# Copyright (C) NGINX, Inc.
NXT_PYTHON_CONFIG="${NXT_PYTHON}-config"
NXT_PYTHON_VERSION=`${NXT_PYTHON} -c \
'import sys; \
sys.stdout.write(sys.version[:3])'`
NXT_PYTHON_INCLUDE=`${NXT_PYTHON_CONFIG} --includes`
NXT_PYTHON_LIBS=`${NXT_PYTHON_CONFIG} --ldflags`
nxt_feature="Python"
nxt_feature_name=NXT_HAVE_PYTHON
nxt_feature_run=no
nxt_feature_incs="${NXT_PYTHON_INCLUDE}"
nxt_feature_libs="${NXT_PYTHON_LIBS}"
nxt_feature_test="#include <Python.h>
int main() {
Py_Initialize();
return 0;
}"
. auto/feature
if [ $nxt_found = no ]; then
$echo
$echo $0: error: no Python found.
$echo
exit 1;
fi
$echo " + Python version: ${NXT_PYTHON_VERSION}"
NXT_PYTHON_MODULE_SRCS=" \
src/nxt_python_wsgi.c \
"
NXT_MODULES_INIT="$NXT_MODULES_INIT nxt_python_wsgi_init"
NXT_MODULES_SRCS="$NXT_MODULES_SRCS $NXT_PYTHON_MODULE_SRCS"
NXT_LIB_AUX_LIBS="$NXT_LIB_AUX_LIBS $NXT_PYTHON_LIBS"
|