Skip to content

Commit b5ff41a

Browse files
committed
Minimize the patch on jupyter-sphinx
1 parent 5f8fb1a commit b5ff41a

File tree

1 file changed

+5
-32
lines changed

1 file changed

+5
-32
lines changed

build/pkgs/jupyter_sphinx/patches/0001-Patch-for-sage-live-doc.patch

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
1-
From f95c7a7a393f0eef9989dddffc70a09ac0a14c35 Mon Sep 17 00:00:00 2001
1+
From fa6e7b31ebd7f6dbf02e1e4c1056e4ef1389884e Mon Sep 17 00:00:00 2001
22
From: Kwankyu Lee <[email protected]>
33
Date: Mon, 28 Aug 2023 00:18:59 +0900
44
Subject: [PATCH] Patch for sage live doc
55

66
---
7-
jupyter_sphinx/__init__.py | 8 +++++---
7+
jupyter_sphinx/__init__.py | 2 +-
88
jupyter_sphinx/execute.py | 11 +++++++++++
9-
2 files changed, 16 insertions(+), 3 deletions(-)
9+
2 files changed, 12 insertions(+), 1 deletion(-)
1010

1111
diff --git a/jupyter_sphinx/__init__.py b/jupyter_sphinx/__init__.py
12-
index 34af884..f5a7f44 100644
12+
index 34af884..f2e17e0 100644
1313
--- a/jupyter_sphinx/__init__.py
1414
+++ b/jupyter_sphinx/__init__.py
15-
@@ -2,6 +2,7 @@
16-
17-
from pathlib import Path
18-
19-
+import os
20-
import docutils
21-
import ipywidgets
22-
from IPython.lib.lexers import IPython3Lexer, IPythonTracebackLexer
23-
@@ -31,7 +32,7 @@ from .thebelab import ThebeButton, ThebeButtonNode, ThebeOutputNode, ThebeSource
15+
@@ -31,7 +31,7 @@ from .thebelab import ThebeButton, ThebeButtonNode, ThebeOutputNode, ThebeSource
2416
REQUIRE_URL_DEFAULT = (
2517
"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"
2618
)
@@ -29,25 +21,6 @@ index 34af884..f5a7f44 100644
2921

3022
logger = logging.getLogger(__name__)
3123

32-
@@ -186,7 +187,7 @@ def setup(app):
33-
app.add_config_value("jupyter_sphinx_embed_url", None, "html")
34-
35-
# thebelab config, can be either a filename or a dict
36-
- app.add_config_value("jupyter_sphinx_thebelab_config", None, "html")
37-
+ app.add_config_value("jupyter_sphinx_thebelab_config", None, "env")
38-
app.add_config_value("jupyter_sphinx_thebelab_url", THEBELAB_URL_DEFAULT, "html")
39-
40-
# linenos config
41-
@@ -290,7 +291,8 @@ def setup(app):
42-
app.add_lexer("ipythontb", IPythonTracebackLexer)
43-
app.add_lexer("ipython3", IPython3Lexer)
44-
45-
- app.connect("builder-inited", builder_inited)
46-
+ if os.environ.get('SAGE_LIVE_DOC', 'no') == 'yes':
47-
+ app.connect("builder-inited", builder_inited)
48-
app.connect("build-finished", build_finished)
49-
50-
# add jupyter-sphinx and thebelab js and css
5124
diff --git a/jupyter_sphinx/execute.py b/jupyter_sphinx/execute.py
5225
index 558a26b..de44455 100644
5326
--- a/jupyter_sphinx/execute.py

0 commit comments

Comments
 (0)