Skip to content

Commit

Permalink
Revert "binder: install loops from pip"
Browse files Browse the repository at this point in the history
This reverts commit 16ecff6.
  • Loading branch information
keckelt committed Apr 18, 2024
1 parent 34e8144 commit f224c2e
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 2 deletions.
4 changes: 2 additions & 2 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ dependencies:
- scikit-learn
- yellowbrick
- mscorefonts
- pip:
- loops-diff
# additional packages for demos
# - ipywidgets
49 changes: 49 additions & 0 deletions binder/postBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env python3
""" perform a development install of loops
On Binder, this will run _after_ the environment has been fully created from
the environment.yml in this directory.
This script should also run locally on Linux/MacOS/Windows:
python3 binder/postBuild
"""
import subprocess
import sys
from pathlib import Path


ROOT = Path.cwd()

def _(*args, **kwargs):
""" Run a command, echoing the args
fails hard if something goes wrong
"""
print("\n\t", " ".join(args), "\n")
return_code = subprocess.call(args, **kwargs)
if return_code != 0:
print("\nERROR", return_code, " ".join(args))
sys.exit(return_code)

# verify the environment is self-consistent before even starting
_(sys.executable, "-m", "pip", "check")

# install the labextension
#_(sys.executable, "-m", "pip", "install", "-e", ".")
#_(sys.executable, "-m", "jupyter", "labextension", "develop", "--overwrite", ".")

_(sys.executable, "-m", "pip", "install", "loops-diff")

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

# list the extensions
_("jupyter", "server", "extension", "list")

# initially list installed extensions to determine if there are any surprises
_("jupyter", "labextension", "list")


print("JupyterLab with loops is ready to run with:\n")
print("\tjupyter lab\n")

0 comments on commit f224c2e

Please sign in to comment.