1
# A utility that executes a script from our %PYTHON%\Scripts directory.
 
 
3
# 'python run_script.py cog.py arg1 arg2'
 
 
4
# which will locate %PYTHON_HOME%/Scripts/cog.py and execute it with the args.
 
 
5
# This is only necessary for Windows, and only when the build process is
 
 
6
# executed via a cygwin/*nix based make utility, which doesn't honor the
 
 
7
# PATHEXT environment variable.
 
 
11
if __name__ == '__main__':
 
 
12
    # clobber me, new sys.argv[0] is the script to run.
 
 
14
    assert not os.path.isabs(sys.argv[0]), "If you know the FQ path, just use it!"
 
 
15
    sys.argv[0] = os.path.join(sys.prefix, "Scripts", sys.argv[0])