Skip to content

Commit

Permalink
Merge pull request #8 from vinklein/master
Browse files Browse the repository at this point in the history
Remove call of install_nbextension
  • Loading branch information
sebasguts authored Jan 24, 2018
2 parents ca9711b + 2f5612f commit 6393850
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

class install(_install):
def run(self):
from notebook.nbextensions import enable_nbextension, install_nbextension
from notebook.nbextensions import enable_nbextension
# run from distutils install
_install.run(self)

Expand All @@ -36,14 +36,10 @@ def run(self):
os.chmod(td, 0o755) # Starts off as 700, not user readable
with open(os.path.join(td, 'kernel.json'), 'w') as f:
json.dump(kernel_json, f, sort_keys=True)
path_of_file = dirname( abspath(__file__) ) + "/jupyter_kernel_singular/resources/"
file_copy(path_of_file + "logo-32x32.png", td )
file_copy(path_of_file + "logo-64x64.png", td )
print('Installing IPython kernel spec')
install_kernel_spec(td, 'Singular', user=self.user, replace=True)

#install codemirror notebook extension
install_nbextension('jupyter_kernel_singular/singular-mode', overwrite=True, user=self.user)
# enable codemirror notebook extension
enable_nbextension('notebook', 'singular-mode/main')

setup( name="jupyter_kernel_singular"
Expand All @@ -54,6 +50,7 @@ def run(self):
, url="https://github.com/sebasguts/jupyter-singular"
, packages=["jupyter_kernel_singular"]
, package_dir={"jupyter_kernel_singular": "jupyter_kernel_singular"}
, data_files=[(kernelpath, glob("resources/*")), (nbextpath, glob("singular-mode/*"))]
, cmdclass={'install':install}
, data_files=[(kernelpath, glob("jupyter_kernel_singular/resources/*")),
(nbextpath, glob("jupyter_kernel_singular/singular-mode/*"))]
, cmdclass={'install': install}
)

0 comments on commit 6393850

Please sign in to comment.