Skip to content

Commit ee73aee

Browse files
authored
Merge pull request #262 from kayjan/fix-playground
docs: Read whl files from source
2 parents 8f73745 + f3c7704 commit ee73aee

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

docs/_static/playground-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var colorNotebook = {
2-
"playgroundWheels": ['pygments-2.17.2-py3-none-any.whl', 'bigtree-0.19.0-py3-none-any.whl'],
2+
"playgroundWheels": ['https://files.pythonhosted.org/packages/97/9c/372fef8377a6e340b1704768d20daaded98bf13282b5327beb2e2fe2c7ef/pygments-2.17.2-py3-none-any.whl', 'https://files.pythonhosted.org/packages/d3/58/7d2dd906add6bd3481ee80beafb00af292866ed4ce3fa18cd168cb7bab74/bigtree-0.19.0-py3-none-any.whl'],
33
"notebookWheels": [],
44
"defaultPlayground": ""
55
}

docs/_static/playground.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ function _typeof(t) {
796796
t.next = 14;
797797
break
798798
}
799-
o = "".concat(window.location.origin, "/").concat(window.location.pathname.split("/")[1], "/wheels/"), a = n ? window.colorNotebook.notebookWheels : window.colorNotebook.playgroundWheels, s = [], n ? y = !0 : v = !0, l = r(a);
799+
o = "", a = n ? window.colorNotebook.notebookWheels : window.colorNotebook.playgroundWheels, s = [], n ? y = !0 : v = !0, l = r(a);
800800
try {
801801
for (l.s(); !(c = l.n()).done;)(u = c.value).endsWith(".whl") ? s.push(o + u) : s.push(u)
802802
} catch (t) {

docs/_static/playground_whl.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
DEFAULT_COMMANDS = [""]
2121

2222
PLAYGROUND_WHEELS = [
23-
"https://files.pythonhosted.org/packages/97/9c/372fef8377a6e340b1704768d20daaded98bf13282b5327beb2e2fe2c7ef/pygments-2.17.2-py3-none-any.whl"
23+
"https://files.pythonhosted.org/packages/97/9c/372fef8377a6e340b1704768d20daaded98bf13282b5327beb2e2fe2c7ef/pygments-2.17.2-py3-none-any.whl",
24+
"https://files.pythonhosted.org/packages/d3/58/7d2dd906add6bd3481ee80beafb00af292866ed4ce3fa18cd168cb7bab74/bigtree-0.19.0-py3-none-any.whl",
2425
]
2526

2627
CONFIG = """\
@@ -103,26 +104,26 @@ def download_wheel(url, dest):
103104
os.mkdir("docs/wheels")
104105

105106
# Build wheel
106-
status, package = build_package()
107-
if not status:
108-
for file, url in PLAYGROUND.items():
109-
if os.path.exists(file):
110-
print("Skipping: {}".format(file))
111-
continue
112-
status = download_wheel(url, file)
113-
if status:
114-
break
107+
status = 0
108+
# status, package = build_package()
109+
# if not status:
110+
# for file, url in PLAYGROUND.items():
111+
# if os.path.exists(file):
112+
# print("Skipping: {}".format(file))
113+
# continue
114+
# status = download_wheel(url, file)
115+
# if status:
116+
# break
115117

116118
if not status:
117119
# Build up a list of wheels needed for playgrounds and notebooks
118-
playground = [
119-
os.path.basename(file_path) for file_path in PLAYGROUND.keys()
120-
] + [package]
121-
notebook = playground
120+
# playground = [
121+
# os.path.basename(file_path) for file_path in PLAYGROUND.keys()
122+
# ] + [package]
122123

123124
# Create the config that specifies which wheels need to be used
124125
config = (
125-
CONFIG.format(str(playground), "\n".join(DEFAULT_COMMANDS))
126+
CONFIG.format(str(PLAYGROUND_WHEELS), "\n".join(DEFAULT_COMMANDS))
126127
.replace("\r", "")
127128
.encode("utf-8")
128129
)

0 commit comments

Comments
 (0)