ci_install.ps1 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Copyright (c) Jupyter Development Team.
  2. # Distributed under the terms of the Modified BSD License.
  3. $ErrorActionPreference = 'stop'
  4. # create jupyter base dir (needed for config retrieval)
  5. New-Item -Path $Env:USERPROFILE\.jupyter -ItemType "directory" -Force
  6. # Install and enable the server extension
  7. pip install -q --upgrade pip --user
  8. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  9. pip --version
  10. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  11. pip install jupyter_packaging
  12. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  13. # Show a verbose install if the install fails, for debugging
  14. pip install -e ".[test]" || pip install -v -e ".[test]"
  15. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  16. jlpm versions
  17. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  18. jlpm config current
  19. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  20. jupyter lab path
  21. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  22. jupyter server extension enable jupyterlab
  23. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  24. # TODO: batch script grepping
  25. # TODO: remove when we no longer support classic notebook
  26. jupyter serverextension enable jupyterlab
  27. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  28. # TODO: batch script grepping
  29. if ($Env:GROUP -eq "integrity") {
  30. pip install notebook==4.3.1
  31. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  32. }
  33. if ((Test-Path -LiteralPath variable:\LASTEXITCODE)) { exit $LASTEXITCODE }