File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ def install(nb_path=None, DEBUG=False):
1313 print ('Starting hide_code.js install...' )
1414 current_dir = path .abspath (path .dirname (__file__ ))
1515 config_dirs = j_path .jupyter_config_path ()
16- site_packages_path = path . join ( os . __file__ [: - 7 ], "site-packages" )
16+ site_packages_path = get_site_package_dir ( )
1717
1818 # check for config directory with a "custom" folder
1919 # TODO update this logic to check if custom.js file exists
@@ -64,4 +64,11 @@ def install(nb_path=None, DEBUG=False):
6464 else :
6565 print ('Unable to install into ' + install_path )
6666 print ('Directory doesn\' t exist.' )
67- print ('Make sure Jupyter is installed.' )
67+ print ('Make sure Jupyter is installed.' )
68+
69+ def get_site_package_dir ():
70+ os_file = os .__file__
71+ if os_file .endswith ('c' ):
72+ return path .join (os_file [:- 7 ], "site-packages" )
73+ else :
74+ return path .join (os_file [:- 6 ], "site-packages" )
You can’t perform that action at this time.
0 commit comments