Merge pull request #40 from halfhorst/master

add resources/ as package data
This commit is contained in:
Brendan Rius 2018-01-24 11:01:54 +01:00 committed by GitHub
commit ca942437f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 3 deletions

View File

@ -7,7 +7,7 @@ WORKDIR /tmp
COPY ./ jupyter_c_kernel/
RUN pip install --no-cache-dir -e jupyter_c_kernel/
RUN pip install --no-cache-dir jupyter_c_kernel/
RUN cd jupyter_c_kernel && install_c_kernel --user
WORKDIR /home/$NB_USER/

1
MANIFEST.in Normal file
View File

@ -0,0 +1 @@
include jupyter_c_kernel/resources/master.c

View File

@ -83,7 +83,7 @@ class CKernel(Kernel):
mastertemp = tempfile.mkstemp(suffix='.out')
os.close(mastertemp[0])
self.master_path = mastertemp[1]
filepath = path.join(path.dirname(path.realpath(__file__)), '..', 'resources', 'master.c')
filepath = path.join(path.dirname(path.realpath(__file__)), 'resources', 'master.c')
subprocess.call(['gcc', filepath, '-std=c11', '-rdynamic', '-ldl', '-o', self.master_path])
def cleanup_files(self):

View File

@ -9,5 +9,6 @@ setup(name='jupyter_c_kernel',
download_url='https://github.com/brendanrius/jupyter-c-kernel/tarball/1.2.1',
packages=['jupyter_c_kernel'],
scripts=['jupyter_c_kernel/install_c_kernel'],
keywords=['jupyter', 'notebook', 'kernel', 'c']
keywords=['jupyter', 'notebook', 'kernel', 'c'],
include_package_data=True
)