Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-saurer authored Feb 25, 2024
1 parent cd9554c commit d969adc
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def print_exception_info():
jupyter_kernels_dir = os.path.join(jupyter_kernels_dir,'kernels')

# Build notebook syntax directory
notebook_syntax_dir = os.path.join(site_packages_dir ,'notebook' )
#notebook_syntax_dir = os.path.join(site_packages_dir ,'notebook' )
notebook_syntax_dir = os.path.join(site_packages_dir ,'nbclassic' )
notebook_syntax_dir = os.path.join(notebook_syntax_dir,'static' )
notebook_syntax_dir = os.path.join(notebook_syntax_dir,'components')
notebook_syntax_dir = os.path.join(notebook_syntax_dir,'codemirror')
Expand Down Expand Up @@ -118,9 +119,9 @@ def print_exception_info():
src_kernel_definition_files.append(os.path.join(src_kernel_definition_dir,'logo-64x64.png'))

src_syntax_dir = os.path.join(src_root_dir,'syntax')
src_syntax_dir = os.path.join(src_syntax_dir,'J')
src_syntax_dir = os.path.join(src_syntax_dir,'j')
src_syntax_files = []
src_syntax_files.append(os.path.join(src_syntax_dir,'J.js'))
src_syntax_files.append(os.path.join(src_syntax_dir,'j.js'))

###############################################################################
# Parse arguments and invoke action
Expand Down Expand Up @@ -151,9 +152,9 @@ def print_exception_info():
shutil.copytree(src_kernel_definition_dir,os.path.join(jupyter_kernels_dir,'jkernel'))
except:
print_exception_info()
print('Copy: ' + src_syntax_dir + ' => ' + os.path.join(notebook_syntax_dir,'J'))
print('Copy: ' + src_syntax_dir + ' => ' + os.path.join(notebook_syntax_dir,'j'))
try:
shutil.copytree(src_syntax_dir,os.path.join(notebook_syntax_dir,'J'))
shutil.copytree(src_syntax_dir,os.path.join(notebook_syntax_dir,'j'))
except:
print_exception_info()
print('Done.')
Expand Down Expand Up @@ -188,9 +189,9 @@ def print_exception_info():
shutil.rmtree(os.path.join(jupyter_kernels_dir,'jkernel'))
except:
print_exception_info()
print('Remove: ' + os.path.join(notebook_syntax_dir,'J'))
print('Remove: ' + os.path.join(notebook_syntax_dir,'j'))
try:
shutil.rmtree(os.path.join(notebook_syntax_dir,'J'))
shutil.rmtree(os.path.join(notebook_syntax_dir,'j'))
except:
print_exception_info()
print('Done.')
Expand Down Expand Up @@ -232,7 +233,7 @@ def print_exception_info():
print(df + ' => MISSING')
all_ok = False

pth = os.path.join(notebook_syntax_dir,'J')
pth = os.path.join(notebook_syntax_dir,'j')
if os.access(pth,os.R_OK):
print(pth + ' => OK')
else:
Expand Down

0 comments on commit d969adc

Please sign in to comment.