diff mbox series

[bug#51314,v4,14/14] gnu: Add octoprint.

Message ID 20220529182746.314668-15-monego@posteo.net
State New
Headers show
Series Add Octoprint (web UI for 3d printers). | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Vinicius Monego May 29, 2022, 6:27 p.m. UTC
* gnu/packages/printers.scm (octoprint): New variable.
---
 gnu/packages/printers.scm | 88 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 87 insertions(+), 1 deletion(-)

Comments

M May 29, 2022, 9:58 p.m. UTC | #1
Vinicius Monego schreef op zo 29-05-2022 om 18:27 [+0000]:
> +    (license license:agpl3)))

Does upstream intend agpl3-only, or agpl3-or-later?  Could we have some
clarification from upstream?  Preferably the latter if there will ever
be a agpl4.

Greetings,
Maxime
Vinicius Monego May 30, 2022, 8:46 p.m. UTC | #2
Em dom, 2022-05-29 às 23:58 +0200, Maxime Devos escreveu:
> Vinicius Monego schreef op zo 29-05-2022 om 18:27 [+0000]:
> > +    (license license:agpl3)))
> 
> Does upstream intend agpl3-only, or agpl3-or-later?  Could we have
> some
> clarification from upstream?  Preferably the latter if there will
> ever
> be a agpl4.
> 
> Greetings,
> Maxime

It is agpl3-only. License in the file headers:

__copyright__ = "Copyright (C) [year] The OctoPrint Project - Released
under terms of the AGPLv3 License"

And in setup.py:

"License :: OSI Approved :: GNU Affero General Public License v3"
M May 30, 2022, 9:09 p.m. UTC | #3
Vinicius Monego schreef op ma 30-05-2022 om 20:46 [+0000]:
> Em dom, 2022-05-29 às 23:58 +0200, Maxime Devos escreveu:
> > Vinicius Monego schreef op zo 29-05-2022 om 18:27 [+0000]:
> > > +    (license license:agpl3)))
> > 
> > Does upstream intend agpl3-only, or agpl3-or-later?  Could we have
> > some
> > clarification from upstream?  Preferably the latter if there will
> > ever
> > be a agpl4.
> > 
> > Greetings,
> > Maxime
> 
> It is agpl3-only. License in the file headers:
> 
> __copyright__ = "Copyright (C) [year] The OctoPrint Project - Released
> under terms of the AGPLv3 License"
> 
> And in setup.py:
> 
> "License :: OSI Approved :: GNU Affero General Public License v3"

It just says AGPLv3, it doesn't say -only or -or-later (*).
I've seen these, but they are not explicit about -only or -or-later,
Sometimes, when asked for clarifications, upstreams clarifies such
ambigious phrasing to be -or-later, sometimes -only.  In this case, I'd
expect -only.  But I think it's best to just ask upstream.

(*) the convention for setup.py seems to be ‘not mentioned -> -only’, 
but hypothetical '-only' information could also easily have been lost
during writing the setup.py or an over-eager ‘abbreviating’ the
copyright/license headers.

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/gnu/packages/printers.scm b/gnu/packages/printers.scm
index edbc1386b5..acf341c5d6 100644
--- a/gnu/packages/printers.scm
+++ b/gnu/packages/printers.scm
@@ -25,10 +25,15 @@  (define-module (gnu packages printers)
   #: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 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 python-web))
+  #:use-module (gnu packages web))
 
 ;; This is a module for packages related to printer-like devices, but not
 ;; related to CUPS.
@@ -106,6 +111,87 @@  (define-public octoprint-filecheck
 the past have caused support requests on OctoPrint's Community Forums.")
     (license license:agpl3)))
 
+(define-public octoprint
+  (package
+    (name "octoprint")
+    (version "1.8.1")
+    (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 "0yqbq4gbnzgbipv35z5b1i1f8x20p0gdz37721f163iyipsxppj6"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Remove bundled font-awesome.
+           (delete-file-recursively "src/octoprint/static/vendor")))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'set-home
+           (lambda _
+             (setenv "HOME" (getcwd)))) ; some tests need a writable home
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest" "tests")))))))
+    (native-inputs
+     (list python-ddt python-mock python-pytest python-pytest-doctest-custom))
+    (inputs
+     (list octoprint-filecheck
+           octoprint-firmwarecheck
+           octoprint-pisupport
+           python-appdirs
+           python-blinker
+           python-cachelib-0.2
+           python-click
+           python-colorlog
+           python-emoji
+           python-feedparser
+           python-filetype
+           python-flask
+           python-flask-assets
+           python-flask-babel
+           python-flask-login-0.5
+           python-frozendict
+           python-future
+           python-immutabledict
+           python-itsdangerous
+           python-jinja2
+           python-markdown
+           python-markupsafe
+           python-netaddr
+           python-netifaces
+           python-pathvalidate
+           python-pkginfo
+           python-psutil
+           python-pylru
+           python-pyserial
+           python-pyyaml-5
+           python-regex
+           python-requests
+           python-sarge-0.1.6
+           python-semantic-version
+           python-sentry-sdk
+           python-tornado-6
+           python-unidecode
+           python-watchdog-1
+           python-websocket-client
+           python-werkzeug
+           python-wrapt-1.13
+           python-zeroconf-0.33
+           python-zipstream-ng))
+    (home-page "https://octoprint.org")
+    (synopsis "Web interface for 3D printers")
+    (description "OctoPrint provides a snappy web interface for controlling
+consumer 3D printers.")
+    (license license:agpl3)))
+
 (define-public robocut
   (package
     (name "robocut")