forked from Dr-Irv/opalytics-ticdat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sam Nelson
committed
May 17, 2017
1 parent
be015cd
commit 79582e7
Showing
3 changed files
with
31 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
print "This script configures a lingorun_path.txt file in order to enable use with runlingo." | ||
print "You need to run this script from the directory containing runlingo " | ||
print "(or runlingo.exe on windows)" | ||
print "This is a one-time post 'pip install' setup step." | ||
|
||
import ticdat.testing.ticdattestutils as tdu | ||
tdu.configure_runlingo_path() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,20 @@ def configure_oplrun_path(): | |
with open(os.path.join(opl_dir, "oplrun_path.txt"), "w") as f: | ||
f.write(oplrun_path) | ||
|
||
def configure_runlingo_path(): | ||
if sys.platform in ['win32']: | ||
runlingo_name = os.path.abspath('runlingo.exe') | ||
else: | ||
runlingo_name = os.path.abspath('runlingo') | ||
verify(os.path.isfile(runlingo_name), "You need to be in the directory containing runlingo") | ||
lingo_dir = os.path.abspath(os.path.join(_codeDir(), "..")) | ||
v_str = "Contact ticdat support at [email protected]" | ||
verify(os.path.isdir(lingo_dir), "%s is strangely not a directory. %s"%(lingo_dir, v_str)) | ||
verify(os.path.isfile(os.path.join(lingo_dir,"lingo.py")), "opl.py is missing. %s"%v_str) | ||
runlingo_path = os.path.abspath(runlingo_name) | ||
with open(os.path.join(lingo_dir, "runlingo_path.txt"), "w") as f: | ||
f.write(runlingo_path) | ||
|
||
_debug = [] | ||
def _asserting() : | ||
_debug.append(()) | ||
|