Mercurial > hg > Members > aka > jupyter_CbC_kernel
comparison jupyter_c_kernel/kernel.py @ 75:a1e3b056a4bd 1.2.2
Merge pull request #40 from halfhorst/master
add resources/ as package data
committer: GitHub <noreply@github.com>
author | Brendan Rius <brendan.rius@gmail.com> |
---|---|
date | Wed, 24 Jan 2018 11:01:54 +0100 |
parents | 40c903dde893 |
children |
comparison
equal
deleted
inserted
replaced
70:eec68d0a113e | 75:a1e3b056a4bd |
---|---|
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: |