forked from unbit/uwsgi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuwsgiplugin.py
More file actions
32 lines (26 loc) · 790 Bytes
/
uwsgiplugin.py
File metadata and controls
32 lines (26 loc) · 790 Bytes
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
import os
NAME = 'lua'
LUAINC = os.environ.get('UWSGICONFIG_LUAINC')
LUALIB = os.environ.get('UWSGICONFIG_LUALIB')
LUALIBPATH = os.environ.get('UWSGICONFIG_LUALIBPATH')
LUAPC = os.environ.get('UWSGICONFIG_LUAPC', 'lua5.1')
# we LUAINC/LUALIB/LUALIBPATH override the LUAPC for backwards compat
if LUAINC:
CFLAGS = ['-I%s' % LUAINC]
else:
try:
CFLAGS = os.popen('pkg-config --cflags %s' % LUAPC).read().rstrip().split()
except Exception:
CFLAGS = ['-I/usr/include/lua5.1']
if LUALIB:
LIBS = ['-l%s' % LUALIB]
else:
try:
LIBS = os.popen('pkg-config --libs %s' % LUAPC).read().rstrip().split()
except Exception:
LIBS = ['-llua5.1']
if LUALIBPATH:
LDFLAGS = ['-L%s' % LUALIBPATH]
else:
LDFLAGS = []
GCC_LIST = ['lua_plugin']