File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 55
66from jupyter_client .kernelspec import KernelSpecManager
77from IPython .utils .tempdir import TemporaryDirectory
8- from pkg_resources import resource_filename
8+ import importlib . resources as resources
99from shutil import copyfile
1010from pathlib import Path
1111from textwrap import dedent
@@ -25,8 +25,8 @@ def install_my_kernel_spec(user=True, prefix=None):
2525 json .dump (kernel_json , f , sort_keys = True )
2626
2727 # Copy logo to tempdir to be installed with kernelspec
28- logo_path = resource_filename ('nbstata' , 'logo-64x64.png' )
29- copyfile (logo_path , os .path .join (td , 'logo-64x64.png' ))
28+ with resources . path ('nbstata' , 'logo-64x64.png' ) as logo_path :
29+ copyfile (logo_path , os .path .join (td , 'logo-64x64.png' ))
3030
3131 print ('Installing Jupyter kernel spec' )
3232 KernelSpecManager ().install_kernel_spec (td , 'nbstata' , user = user , prefix = prefix )
You can’t perform that action at this time.
0 commit comments