ci_install.ps1 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. # Show a verbose install if the install fails, for debugging
  12. pip install -e ".[test]" || pip install -v -e ".[test]"
  13. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  14. jlpm versions
  15. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  16. jlpm config current
  17. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  18. jupyter lab path
  19. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  20. jupyter server extension enable jupyterlab
  21. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  22. # TODO: batch script grepping
  23. # TODO: remove when we no longer support classic notebook
  24. jupyter serverextension enable jupyterlab
  25. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  26. # TODO: batch script grepping
  27. if ($Env:GROUP -eq "integrity") {
  28. pip install notebook==4.3.1
  29. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  30. }
  31. if ((Test-Path -LiteralPath variable:\LASTEXITCODE)) { exit $LASTEXITCODE }