fix minor CI problem

parent 29861b9a
from rpython.rlib.rmu.zebu import *
# from rpython.rlib.rmu.zebu import *
from rpython.rtyper.lltypesystem import lltype, rffi
from rpython.tool.ansi_print import AnsiLogger
logger = AnsiLogger('rtzebu.py')
c_exit = rffi.llexternal('exit', [rffi.INT], lltype.Void, _nowrapper=True)
......@@ -472,44 +477,44 @@ def fpath_to_fname(file_path):
return mod_name
def deepcopy_func(func, last_name):
import os
import sys
src_path = func.func_code.co_filename
dst_fld = fpath_to_dir(src_path)
dst_tmp = dst_fld + '/func_copy_tmp_folder'
os.system('mkdir %s' % dst_tmp)
mod_name = fpath_to_fname(src_path[:-3] + last_name)
dst_path = dst_tmp + '/' + mod_name + '.py'
print ('dst_path = %s' % dst_path)
os.system('cp %s %s' % (src_path, dst_path))
# _mod_dir = fpath_to_dir(dst_path)
if dst_tmp not in sys.path:
sys.path.append(dst_tmp)
print ('mod_name = %s' % mod_name)
func_name = func.func_name
# copy_func_name = func_name + last_name
# print copy_func_name
imp_cmd = 'from %s import %s as func_copy \nglobal ret_val \nret_val = func_copy \nprint(ret_val)' % (mod_name, func_name)
# init_ret_val = ('ret_val = func_copy')\
print ('import command = %s' % imp_cmd)
bridge = None
# exec (imp_cmd, {'ret_val': ret_val})
exec (imp_cmd)
# os.system('rm %s' % dst_path)
# exec (init_ret_val, {'ret_val': ret_val, copy_func_name: bridge})
# exec (init_ret_val, {'ret_val': ret_val, copy_func_name: bridge})
return ret_val
# def deepcopy_func(func, last_name):
# import os
# import sys
#
# src_path = func.func_code.co_filename
# dst_fld = fpath_to_dir(src_path)
# dst_tmp = dst_fld + '/func_copy_tmp_folder'
# os.system('mkdir %s' % dst_tmp)
#
# mod_name = fpath_to_fname(src_path[:-3] + last_name)
# dst_path = dst_tmp + '/' + mod_name + '.py'
#
# print ('dst_path = %s' % dst_path)
#
# os.system('cp %s %s' % (src_path, dst_path))
#
# # _mod_dir = fpath_to_dir(dst_path)
# if dst_tmp not in sys.path:
# sys.path.append(dst_tmp)
#
# print ('mod_name = %s' % mod_name)
#
# func_name = func.func_name
# # copy_func_name = func_name + last_name
# # print copy_func_name
#
# imp_cmd = 'from %s import %s as func_copy \nglobal ret_val \nret_val = func_copy \nprint(ret_val)' % (mod_name, func_name)
# # init_ret_val = ('ret_val = func_copy')\
# print ('import command = %s' % imp_cmd)
#
# bridge = None
# # exec (imp_cmd, {'ret_val': ret_val})
# exec (imp_cmd)
# # os.system('rm %s' % dst_path)
# # exec (init_ret_val, {'ret_val': ret_val, copy_func_name: bridge})
# # exec (init_ret_val, {'ret_val': ret_val, copy_func_name: bridge})
#
# return ret_val
# extracts the copy id from the rtmu_graphs name and converts it to int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment