Blob Blame History Raw
From e69255453c815666406f98779141de7cc9251f10 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Thu, 15 Mar 2018 02:30:11 -0400
Subject: [PATCH] Use tempfile instead of IPython to get a temp dir.

IPython is a very heavy dep for something that's in the standard
library.

Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
 jupyter_c_kernel/install_c_kernel | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/jupyter_c_kernel/install_c_kernel b/jupyter_c_kernel/install_c_kernel
index fcd009d..0906955 100644
--- a/jupyter_c_kernel/install_c_kernel
+++ b/jupyter_c_kernel/install_c_kernel
@@ -1,12 +1,12 @@
 #!/usr/bin/env python
 
+import argparse
 import json
 import os
 import sys
-import argparse
+from tempfile import TemporaryDirectory
 
 from jupyter_client.kernelspec import KernelSpecManager
-from IPython.utils.tempdir import TemporaryDirectory
 
 kernel_json = {
     "argv": [
@@ -28,7 +28,7 @@ def install_my_kernel_spec(user=True, prefix=None):
             json.dump(kernel_json, f, sort_keys=True)
         # TODO: Copy resources once they're specified
 
-        print('Installing IPython kernel spec')
+        print('Installing C kernel spec')
         KernelSpecManager().install_kernel_spec(td, 'c', user=user, replace=True, prefix=prefix)
 
 
-- 
2.14.3