jupyterlab.scm 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. ;; add module imports
  2. (use-modules
  3. (guix packages)
  4. (guix download)
  5. (guix build-system python)
  6. ((guix licenses) #:prefix license:)
  7. ;; use `guix environment --ad-hoc python-jinja2 -- guix
  8. ;; package -A python-jinja2` to find the location of
  9. ;; python-jinja2, which is gnu/packages/python-xyz.scm
  10. (gnu packages python-xyz)
  11. ;; for python-tornado
  12. (gnu packages python-web)
  13. ;; for python-pytest
  14. (gnu packages check))
  15. ;; QUESTION: Why are those required packages not imported by
  16. ;; guix automatically?
  17. ;; QUESTION: Why are the manually imported packages not
  18. ;; actually in files with their own name, but instead jinja2
  19. ;; -> python-xyz, tornado -> python-web, and pytest ->
  20. ;; check?
  21. ;; QUESTION: Is my process of finding the files in which the
  22. ;; packages are correct or just working by chance?
  23. (define-public python-jupyterlab-server
  24. (package
  25. (name "python-jupyterlab-server")
  26. ;; ADDITIONAL: need to switch version to 2.0.0rc1 from
  27. ;; https://files.pythonhosted.org/packages
  28. ;; /79/43/5249be5ee741a93f3fa60823caf9a276cadc3103dae16d6e36cc534fefd8/jupyterlab_server-2.0.0rc1.tar.gz
  29. ;; #sha256=733b149c5ab8e50ea5f2897c323047257060e7bf2dc0fa88663181427bec605d
  30. ;; because the tests are failing for version 1.2.0 and therefore the check phase does not succeed.
  31. ;; START EDIT
  32. ;; ACTION: comment out whole block
  33. (version "1.2.0")
  34. (source
  35. (origin
  36. (method url-fetch)
  37. ;; Here I need to replace: "-" -> "_" for the PyPI
  38. ;; importer to find the package.
  39. (uri (pypi-uri "jupyterlab_server" version))
  40. (sha256
  41. (base32
  42. "132xby7531rbrjg9bqvsx86birr1blynjxy8gi5kcnb6x7fxjcal"))))
  43. ;; END EDIT
  44. ;; (version "2.0.0rc1")
  45. ;; (source
  46. ;; (origin
  47. ;; (method url-fetch)
  48. ;; ;; Here I need to replace: "-" -> "_" for the PyPI
  49. ;; ;; importer to find the package.
  50. ;; (uri (pypi-uri "jupyterlab_server" version))
  51. ;; (sha256
  52. ;; (base32
  53. ;; ;; get the hash for the updated version using "guix hash <tarball>"
  54. ;; "0pb0xixl509ics4gmh1dpzkn0w158wq34z49yajhxrdqbaf18fvk"))))
  55. (build-system python-build-system)
  56. (propagated-inputs
  57. `(("python-jinja2" ,python-jinja2)
  58. ("python-json5" ,python-json5)
  59. ("python-jsonschema" ,python-jsonschema)
  60. ("python-notebook" ,python-notebook)
  61. ("python-requests" ,python-requests)
  62. ;; ADDITIONAL: try it here
  63. ("python-ipykernel" ,python-ipykernel)))
  64. (native-inputs
  65. `(("python-pytest" ,python-pytest)
  66. ("python-requests" ,python-requests)
  67. ;; ADDITIONAL: I have to add a native import here,
  68. ;; because it is needed at build time and there is no
  69. ;; network connection at build time (for safety
  70. ;; reasons probably)
  71. ;; NOTE: guix package -A python-ipykernel will tell
  72. ;; where python-ipykernel is. It is in (gnu packages
  73. ;; python-xyz).
  74. #;("python-ipykernel" ,python-ipykernel)))
  75. (home-page "https://jupyter.org")
  76. (synopsis "JupyterLab Server")
  77. (description "JupyterLab Server")
  78. (license license:bsd-3)))
  79. (define-public python-jupyterlab
  80. (package
  81. (name "python-jupyterlab")
  82. (version "2.1.5")
  83. (source
  84. (origin
  85. (method url-fetch)
  86. (uri (pypi-uri "jupyterlab" version))
  87. (sha256
  88. (base32
  89. "162jn51cg36fsn4l2zhnb5n4nbkhm9wlv974ggcnmdij3i4r4yya"))))
  90. (build-system python-build-system)
  91. (propagated-inputs
  92. `(("python-jinja2" ,python-jinja2)
  93. ("python-jupyterlab-server"
  94. ,python-jupyterlab-server)
  95. ("python-notebook" ,python-notebook)
  96. ("python-tornado" ,python-tornado)))
  97. (native-inputs
  98. `(("python-pytest" ,python-pytest)
  99. ("python-pytest-check-links"
  100. ,python-pytest-check-links)
  101. ("python-requests" ,python-requests)
  102. ("python-virtualenv" ,python-virtualenv)
  103. ("python-wheel" ,python-wheel)))
  104. (home-page "http://jupyter.org")
  105. (synopsis
  106. "The JupyterLab notebook server extension.")
  107. (description
  108. "The JupyterLab notebook server extension.")
  109. (license license:bsd-3)))
  110. python-jupyterlab