Skip to content

Commit 6eb31bd

Browse files
committed
Test extension installed
1 parent 96bb5b0 commit 6eb31bd

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

binder/postBuild

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,46 @@
88
99
python3 binder/postBuild
1010
"""
11-
# import subprocess
12-
# import sys
13-
# from pathlib import Path
11+
import subprocess
12+
import sys
13+
from pathlib import Path
1414

1515

16-
# ROOT = Path.cwd()
16+
ROOT = Path.cwd()
1717

18-
# def _(*args, **kwargs):
19-
# """ Run a command, echoing the args
18+
print(ROOT)
2019

21-
# fails hard if something goes wrong
22-
# """
23-
# print("\n\t", " ".join(args), "\n")
24-
# return_code = subprocess.call(args, **kwargs)
25-
# if return_code != 0:
26-
# print("\nERROR", return_code, " ".join(args))
27-
# sys.exit(return_code)
20+
def _(*args, **kwargs):
21+
""" Run a command, echoing the args
2822
29-
# # verify the environment is self-consistent before even starting
23+
fails hard if something goes wrong
24+
"""
25+
print("\n\t", " ".join(args), "\n")
26+
return_code = subprocess.call(args, **kwargs)
27+
if return_code != 0:
28+
print("\nERROR", return_code, " ".join(args))
29+
sys.exit(return_code)
30+
31+
# verify the environment is self-consistent before even starting
3032
# _(sys.executable, "-m", "pip", "check")
3133

32-
# # install the labextension
33-
# _(sys.executable, "-m", "pip", "install", "-e", ".")
34+
# install the labextension
35+
_(sys.executable, "-m", "pip", "install", "-e", ".")
3436

35-
# # verify the environment the extension didn't break anything
37+
# verify the environment the extension didn't break anything
3638
# _(sys.executable, "-m", "pip", "check")
3739

38-
# # list the extensions
40+
# list the extensions
3941
# _("jupyter", "server", "extension", "list")
4042

41-
# # initially list installed extensions to determine if there are any surprises
43+
# initially list installed extensions to determine if there are any surprises
4244
# _("jupyter", "labextension", "list")
4345

44-
pip install -e .
46+
# pip install -e .
4547

46-
jlpm
48+
# jlpm
4749

48-
jlpm build
50+
# jlpm build
4951

5052
print("JupyterLab with code_snippet is ready to run with:\n")
5153
print("\tjupyter lab\n")

0 commit comments

Comments
 (0)