Ensure builtins.SERVER_MODE is handled if running setup.py standalone.
parent
507d8b3fe4
commit
a65f7b330b
10
web/setup.py
10
web/setup.py
|
@ -13,6 +13,16 @@ and settings database."""
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
if sys.version_info[0] >= 3:
|
||||||
|
import builtins
|
||||||
|
else:
|
||||||
|
import __builtin__ as builtins
|
||||||
|
|
||||||
|
# Grab the SERVER_MODE if it's been set by the runtime
|
||||||
|
if 'SERVER_MODE' in globals():
|
||||||
|
builtins.SERVER_MODE = globals()['SERVER_MODE']
|
||||||
|
else:
|
||||||
|
builtins.SERVER_MODE = None
|
||||||
|
|
||||||
# We need to include the root directory in sys.path to ensure that we can
|
# We need to include the root directory in sys.path to ensure that we can
|
||||||
# find everything we need when running in the standalone runtime.
|
# find everything we need when running in the standalone runtime.
|
||||||
|
|
Loading…
Reference in New Issue