Skip to content

Commit

Permalink
Merge pull request #140 from eunos-1128/feature/jupyter-logo
Browse files Browse the repository at this point in the history
Enable registering logo image
  • Loading branch information
sigmaSd authored Jul 8, 2024
2 parents 6794c21 + 78e5a91 commit ca43cc0
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
11 changes: 7 additions & 4 deletions crates/irust_repl/irust_kernel/irust_kernel/install.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import argparse
import json
import os
import sys
import argparse
import pathlib
import subprocess
import shutil


import sys

from jupyter_client.kernelspec import KernelSpecManager
from IPython.utils.tempdir import TemporaryDirectory

from .resources import LOGO_PATH


kernel_json = {
"argv": [sys.executable, "-m", "irust_kernel", "-f", "{connection_file}"],
"display_name": "IRust",
Expand All @@ -29,6 +31,7 @@ def get_cargo_target_dir():
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)
shutil.copyfile(LOGO_PATH, pathlib.Path(td) / LOGO_PATH.name)

if local_build:
print('Building `Re` executable')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import pathlib


LOGO_PATH = pathlib.Path(__file__).resolve().parent / "logo-svg.svg"
24 changes: 24 additions & 0 deletions crates/irust_repl/irust_kernel/irust_kernel/resources/logo-svg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ca43cc0

Please sign in to comment.