comparison jupyter_c_kernel/kernel.py @ 72:40c903dde893

update master.c path to correspond to where pip install will put it
author Cody Horst <chorst@uw.edu>
date Fri, 08 Dec 2017 20:17:56 -0800
parents 7857f8eea835
children
comparison
equal deleted inserted replaced
71:828af72656e2 72:40c903dde893
81 super(CKernel, self).__init__(*args, **kwargs) 81 super(CKernel, self).__init__(*args, **kwargs)
82 self.files = [] 82 self.files = []
83 mastertemp = tempfile.mkstemp(suffix='.out') 83 mastertemp = tempfile.mkstemp(suffix='.out')
84 os.close(mastertemp[0]) 84 os.close(mastertemp[0])
85 self.master_path = mastertemp[1] 85 self.master_path = mastertemp[1]
86 filepath = path.join(path.dirname(path.realpath(__file__)), '..', 'resources', 'master.c') 86 filepath = path.join(path.dirname(path.realpath(__file__)), 'resources', 'master.c')
87 subprocess.call(['gcc', filepath, '-std=c11', '-rdynamic', '-ldl', '-o', self.master_path]) 87 subprocess.call(['gcc', filepath, '-std=c11', '-rdynamic', '-ldl', '-o', self.master_path])
88 88
89 def cleanup_files(self): 89 def cleanup_files(self):
90 """Remove all the temporary files created by the kernel""" 90 """Remove all the temporary files created by the kernel"""
91 for file in self.files: 91 for file in self.files: