[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#51314] [PATCH 29/29] gnu: Add octoprint.
From: |
Vinicius Monego |
Subject: |
[bug#51314] [PATCH 29/29] gnu: Add octoprint. |
Date: |
Thu, 21 Oct 2021 04:02:00 +0000 |
* gnu/packages/printers.scm (octoprint): New variable.
---
gnu/packages/printers.scm | 115 +++++++++++++++++++++++++++++++++++++-
1 file changed, 114 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/printers.scm b/gnu/packages/printers.scm
index 4056a66ad3..37e1734aad 100644
--- a/gnu/packages/printers.scm
+++ b/gnu/packages/printers.scm
@@ -25,9 +25,15 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (gnu packages check)
#:use-module (gnu packages libusb)
#:use-module (gnu packages pkg-config)
- #:use-module (gnu packages qt))
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages python-check)
+ #:use-module (gnu packages python-web)
+ #:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages qt)
+ #:use-module (gnu packages web))
;; This is a module for packages related to printer-like devices, but not
;; related to CUPS.
@@ -95,6 +101,113 @@ uploaded files that are known to cause issues while
printing and which in
the past have caused support requests on OctoPrint's Community Forums.")
(license license:agpl3)))
+(define-public octoprint
+ (package
+ (name "octoprint")
+ (version "1.7.0")
+ (source
+ (origin
+ (method git-fetch) ; no tests in the PyPI tarball.
+ (uri (git-reference
+ (url "https://github.com/OctoPrint/OctoPrint")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "08a1in2kbgy4w02q2xkhp7m09mvw0hxn3fgcbi1z7f6hg8ibym9n"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Remove bundled font-awesome.
+ (delete-file-recursively "src/octoprint/static/vendor")
+ #t))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'relax-version-requirements
+ ;; Octoprint maintains strict version requirements for Python2
+ ;; compatibility. We're not packaging with Python2, so modify
+ ;; setup.py to relax those versions. Octoprint will drop Python2
+ ;; support in version 2.0 so we won't need this change after it.
+ (lambda _
+ (substitute* "setup.py"
+ (("markdown>=3.1,<3.2") "markdown>=3.1,<4")
+ (("watchdog==0.10.4") "watchdog>=0.10.4")
+ ;; Relax core packages that are outdated in Guix.
+ (("Jinja2>=2.11.3,<3") "Jinja2>=2.11.2,<3")
+ (("requests>=2.26.0,<3") "requests>=2.25,<3"))))
+ (add-before 'check 'set-home
+ (lambda _
+ (setenv "HOME" (getcwd)))) ; some tests need a writable home
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "-m" "pytest" "tests" "-k"
+ (string-append
+ ;; These tests try to write to the source tree and
+ ;; fail with PermissionError.
+ "not test_add_file_overwrite"
+ " and not test_set_external_modification"))))))))
+ (native-inputs
+ `(("python-ddt" ,python-ddt)
+ ("python-mock" ,python-mock)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-doctest-custom"
+ ,python-pytest-doctest-custom)))
+ (inputs
+ `(("octoprint-filecheck" ,octoprint-filecheck)
+ ("octoprint-firmwarecheck" ,octoprint-firmwarecheck)
+ ("octoprint-pisupport" ,octoprint-pisupport)
+ ("python-appdirs" ,python-appdirs)
+ ("python-blinker" ,python-blinker)
+ ("python-cachelib" ,python-cachelib)
+ ("python-click" ,python-click)
+ ("python-colorlog" ,python-colorlog)
+ ("python-emoji" ,python-emoji)
+ ("python-feedparser" ,python-feedparser)
+ ("python-filetype" ,python-filetype)
+ ("python-flask" ,python-flask)
+ ("python-flask-assets" ,python-flask-assets)
+ ("python-flask-babel" ,python-flask-babel)
+ ("python-flask-login" ,python-flask-login)
+ ("python-future" ,python-future)
+ ("python-immutabledict" ,python-immutabledict)
+ ("python-itsdangerous" ,python-itsdangerous)
+ ("python-jinja2" ,python-jinja2)
+ ("python-markdown" ,python-markdown)
+ ("python-markupsafe" ,python-markupsafe)
+ ("python-netaddr" ,python-netaddr)
+ ("python-netifaces" ,python-netifaces)
+ ("python-pathvalidate" ,python-pathvalidate)
+ ("python-pkginfo" ,python-pkginfo)
+ ("python-psutil" ,python-psutil)
+ ("python-pylru" ,python-pylru)
+ ("python-pyserial" ,python-pyserial)
+ ("python-pyyaml" ,python-pyyaml)
+ ("python-regex" ,python-regex)
+ ("python-requests" ,python-requests)
+ ("python-sarge" ,python-sarge)
+ ("python-semantic-version"
+ ,python-semantic-version)
+ ("python-sentry-sdk" ,python-sentry-sdk)
+ ("python-tornado" ,python-tornado-6)
+ ("python-unidecode" ,python-unidecode)
+ ("python-watchdog" ,python-watchdog)
+ ("python-websocket-client"
+ ,python-websocket-client)
+ ("python-werkzeug" ,python-werkzeug)
+ ("python-wrapt" ,python-wrapt)
+ ("python-zeroconf" ,python-zeroconf)
+ ("python-zipstream-new" ,python-zipstream-new)))
+ (home-page "https://octoprint.org")
+ (synopsis "Web interface for 3D printers")
+ (description "OctoPrint provides a snappy web interface for controlling
+consumer 3D printers.")
+ ;; The web interface contains many third party JavaScript libraries under
+ ;; different licenses. Check THIRDPARTYLICENSES.md.
+ (license license:agpl3)))
+
(define-public robocut
(package
(name "robocut")
--
2.30.2
- [bug#51314] [PATCH 15/29] gnu: Add python-sgmllib3k., (continued)
- [bug#51314] [PATCH 15/29] gnu: Add python-sgmllib3k., Vinicius Monego, 2021/10/21
- [bug#51314] [PATCH 16/29] gnu: python-feedparser: Update to 6.0.8., Vinicius Monego, 2021/10/21
- [bug#51314] [PATCH 08/29] gnu: python-flask: Respect #:tests?., Vinicius Monego, 2021/10/21
- [bug#51314] [PATCH 18/29] gnu: python-netifaces: Update to 0.11.0., Vinicius Monego, 2021/10/21
- [bug#51314] [PATCH 07/29] gnu: python-flask: Update to 1.1.4., Vinicius Monego, 2021/10/21
- [bug#51314] [PATCH 11/29] gnu: Add python-zipstream-new., Vinicius Monego, 2021/10/21
- [bug#51314] [PATCH 23/29] gnu: python-zeroconf: Update to 0.33.4., Vinicius Monego, 2021/10/21
- [bug#51314] [PATCH 24/29] gnu: python-wrapt: Update to 1.12.1., Vinicius Monego, 2021/10/21
- [bug#51314] [PATCH 26/29] gnu: Add octoprint-pisupport., Vinicius Monego, 2021/10/21
- [bug#51314] [PATCH 25/29] gnu: python-wrapt: Enable tests., Vinicius Monego, 2021/10/21
- [bug#51314] [PATCH 29/29] gnu: Add octoprint.,
Vinicius Monego <=
- [bug#51314] [PATCH 27/29] gnu: Add octoprint-firmwarecheck., Vinicius Monego, 2021/10/21
- [bug#51314] [PATCH 28/29] gnu: Add octoprint-filecheck., Vinicius Monego, 2021/10/21