Files
ResInsight/ThirdParty/Ert/devel/cmake/cmake_pyc2
Jacob Støren 4be58edf78 MSW code reverted. Regrettfully the work has to be reconsidered.
Both ERT and the resinsight code is rolled back to before MSW was introduced as refined.
p4#: 21999
2013-06-25 15:53:19 +02:00

28 lines
498 B
Python

#!/usr/bin/env python
import py_compile
import os
import os.path
import sys
import shutil
src_file = sys.argv[1]
target_file = sys.argv[2]
(target_path , tail) = os.path.split( target_file )
if not os.path.exists( target_path ):
os.makedirs( target_path )
shutil.copyfile( src_file , target_file )
try:
py_compile.compile( target_file , doraise = True)
except Exception,error:
sys.exit("py_compile(%s) failed:%s" % (target_file , error))
sys.exit(0)