-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathrun.py.in
More file actions
executable file
·23 lines (18 loc) · 702 Bytes
/
run.py.in
File metadata and controls
executable file
·23 lines (18 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python3
"""
Openage can, and should, be launched via python3 -m openage.
However, for dynamic analysis using LLVM's sanitizer, a self-compiled
executable is needed.
This file is Cythonized with an embedded interpreter, producing ./run,
which satisifies that requirement.
"""
if __name__ == '__main__@SOME_UNDEFINED_VARIABLE_CMAKE_WILL_REMOVE@':
# This is stupid but without it, Cython/Python cannot find the openage module.
import os
import sys
sys.path.append(os.getcwd())
from openage.__main__ import main
main()
else:
print("Running this in the source directory is not supported.",
"Please use `make run` or `bin/run.py` to start instead.")