|
8 | 8 |
|
9 | 9 | python3 binder/postBuild |
10 | 10 | """ |
11 | | -# import subprocess |
12 | | -# import sys |
13 | | -# from pathlib import Path |
| 11 | +import subprocess |
| 12 | +import sys |
| 13 | +from pathlib import Path |
14 | 14 |
|
15 | 15 |
|
16 | | -# ROOT = Path.cwd() |
| 16 | +ROOT = Path.cwd() |
17 | 17 |
|
18 | | -# def _(*args, **kwargs): |
19 | | -# """ Run a command, echoing the args |
| 18 | +print(ROOT) |
20 | 19 |
|
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 |
28 | 22 |
|
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 |
30 | 32 | # _(sys.executable, "-m", "pip", "check") |
31 | 33 |
|
32 | | -# # install the labextension |
33 | | -# _(sys.executable, "-m", "pip", "install", "-e", ".") |
| 34 | +# install the labextension |
| 35 | +_(sys.executable, "-m", "pip", "install", "-e", ".") |
34 | 36 |
|
35 | | -# # verify the environment the extension didn't break anything |
| 37 | +# verify the environment the extension didn't break anything |
36 | 38 | # _(sys.executable, "-m", "pip", "check") |
37 | 39 |
|
38 | | -# # list the extensions |
| 40 | +# list the extensions |
39 | 41 | # _("jupyter", "server", "extension", "list") |
40 | 42 |
|
41 | | -# # initially list installed extensions to determine if there are any surprises |
| 43 | +# initially list installed extensions to determine if there are any surprises |
42 | 44 | # _("jupyter", "labextension", "list") |
43 | 45 |
|
44 | | -pip install -e . |
| 46 | +# pip install -e . |
45 | 47 |
|
46 | | -jlpm |
| 48 | +# jlpm |
47 | 49 |
|
48 | | -jlpm build |
| 50 | +# jlpm build |
49 | 51 |
|
50 | 52 | print("JupyterLab with code_snippet is ready to run with:\n") |
51 | 53 | print("\tjupyter lab\n") |
0 commit comments