GNU bug report logs - #52116
[PATCH 0/2] gnu: Add printrun.

Previous Next

Package: guix-patches;

Reported by: Morgan.J.Smith <at> outlook.com

Date: Thu, 25 Nov 2021 22:43:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 52116 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#52116; Package guix-patches. (Thu, 25 Nov 2021 22:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Morgan.J.Smith <at> outlook.com:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 25 Nov 2021 22:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Morgan.J.Smith <at> outlook.com
To: guix-patches <at> gnu.org
Subject: [PATCH 0/2] gnu: Add printrun.
Date: Thu, 25 Nov 2021 17:26:29 -0500
I've tested it and the GUI works great.  It connects to my 3D printer just fine.  I wish we had slic3r packaged but with prusa-slicer and now printrun, we do have a full 3D printing setup available

[PATCH 1/2] gnu: Add python-pyglet.
[PATCH 2/2] gnu: Add printrun.





Information forwarded to guix-patches <at> gnu.org:
bug#52116; Package guix-patches. (Fri, 26 Nov 2021 01:00:01 GMT) Full text and rfc822 format available.

Message #8 received at 52116 <at> debbugs.gnu.org (full text, mbox):

From: Morgan.J.Smith <at> outlook.com
To: 52116 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Subject: [PATCH 1/2] gnu: Add python-pyglet.
Date: Thu, 25 Nov 2021 19:58:47 -0500
From: Morgan Smith <Morgan.J.Smith <at> outlook.com>

* gnu/packages/python-xyz.scm (python-pyglet): New variable.
---
 gnu/packages/python-xyz.scm | 55 +++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d33469815a..79677cccc5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28174,3 +28174,58 @@ (define-public bmap-tools
     ;; contrib/bmap_write.py is gpl2+
     ;; The rest is gpl2
     (license (list license:gpl2+ license:gpl2))))
+
+(define-public python-pyglet
+  (package
+    (name "python-pyglet")
+    (version "1.5.21")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pyglet" version ".zip"))
+       (sha256
+        (base32
+         "1qi8jz8dbyyz3yjz7jm94mll1libda08sk9512xgkdn4dnqdvajs"))))
+    (build-system python-build-system)
+    (inputs
+     `(("mesa" ,mesa)
+       ("glu" ,glu)
+       ("freetype" ,freetype)
+       ("fontconfig" ,fontconfig)
+       ("libx11" ,libx11)))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-pillow" ,python-pillow)
+       ("xorg-server" ,xorg-server-for-tests)
+       ("unzip" ,unzip)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'fix-paths
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (substitute* "pyglet/gl/lib_glx.py"
+               (("'GL'")
+                (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
+               (("'GLU'")
+                (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'")))
+             (substitute* "pyglet/font/freetype_lib.py"
+               (("'freetype'")
+                (string-append "'" (assoc-ref inputs "freetype") "/lib/libfreetype.so'")))
+             (substitute* "pyglet/font/fontconfig.py"
+               (("'fontconfig'")
+                (string-append "'" (assoc-ref inputs "fontconfig") "/lib/libfontconfig.so'")))
+             (substitute* "pyglet/libs/x11/xlib.py"
+               (("'X11'")
+                (string-append "'" (assoc-ref inputs "libx11") "/lib/libX11.so'")))))
+         (replace 'check
+           (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (system "Xvfb :1 &")
+               (setenv "DISPLAY" ":1")
+               (invoke "pytest" "tests/unit")))))))
+    (home-page "http://pyglet.readthedocs.io/en/latest/")
+    (synopsis "Cross-platform windowing and multimedia library")
+    (description "Cross-platform windowing and multimedia library")
+    (license license:bsd-3)))
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#52116; Package guix-patches. (Fri, 26 Nov 2021 01:00:02 GMT) Full text and rfc822 format available.

Message #11 received at 52116 <at> debbugs.gnu.org (full text, mbox):

From: Morgan.J.Smith <at> outlook.com
To: 52116 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Subject: [PATCH 2/2] gnu: Add printrun.
Date: Thu, 25 Nov 2021 19:58:49 -0500
From: Morgan Smith <Morgan.J.Smith <at> outlook.com>

* gnu/packages/printers.scm (printrun): New variable.
---
 gnu/packages/printers.scm | 66 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/gnu/packages/printers.scm b/gnu/packages/printers.scm
index 619a2750e0..91ab1a0dfb 100644
--- a/gnu/packages/printers.scm
+++ b/gnu/packages/printers.scm
@@ -25,6 +25,7 @@ (define-module (gnu packages printers)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
+  #:use-module (guix build-system python)
   #:use-module (guix build-system cmake)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages compression)
@@ -32,6 +33,7 @@ (define-module (gnu packages printers)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages python-science)
+  #:use-module (gnu packages libffi)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages gcc)
@@ -46,6 +48,8 @@ (define-module (gnu packages printers)
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages web)
+  #:use-module (gnu packages wxwidgets)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages qt))
 
@@ -288,3 +292,65 @@ (define-public slic3rapp
     (synopsis "")
     (description "")
     (license #f)))
+
+(define-public printrun
+  (package
+    (name "printrun")
+    (version "2.0.0rc8")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/kliment/Printrun")
+             (commit (string-append "printrun-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bvwrfhmn2km03fp343bd9ddjxv8sp3d0qdxk786rflw4yksbxgn"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-files
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "requirements.txt"
+               (("== 4.1.0") ">= 4.0.0") ;; wxPython
+               (("dbus-python.*") "")) ;; Not sure why it can't find dbus-python
+             (delete-file "printrun/power/osx.py")
+             (delete-file "printrun/packer.py") ;; Uses a non-free library
+
+             ;; Changing the value of python variables
+             (substitute* "printrun/utils.py"
+               (("shared_pronterface_images_dir = .*")
+                (string-append "shared_pronterface_images_dir = \"" (assoc-ref outputs "out")
+                               "/share/pronterface/images\"\n"))
+               (("shared_pixmaps_dir = .*")
+                (string-append "shared_pixmaps_dir = \"" (assoc-ref outputs "out")
+                               "/share/pixmaps\"\n"))
+               (("shared_pronterface_dir = .*")
+                (string-append "shared_pixmaps_dir = \"" (assoc-ref outputs "out")
+                               "/share/pronterface\"\n")))))
+         (add-before 'check 'setup-display
+           (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+             (when tests?
+               (system "Xvfb :1 &")
+               (setenv "DISPLAY" ":1")))))))
+    (inputs
+     `(("python-appdirs" ,python-appdirs)
+       ("python-cairocffi" ,python-cairocffi)
+       ("python-cairosvg" ,python-cairosvg)
+       ("python-cffi" ,python-cffi)
+       ("python-dbus" ,python-dbus)
+       ("python-lxml" ,python-lxml)
+       ("python-numpy" ,python-numpy)
+       ("python-psutil" ,python-psutil)
+       ("python-pyglet" ,python-pyglet)
+       ("python-pyserial" ,python-pyserial)
+       ("python-wxpython" ,python-wxpython)))
+    (native-inputs
+     `(("python-cython" ,python-cython)
+       ("xvfb" ,xorg-server-for-tests)))
+    (home-page "https://github.com/kliment/Printrun/")
+    (synopsis "Printrun is a full suite of host interfaces for 3D printers and CNC")
+    (description "Printrun consists of printcore, pronsole and pronterface, and a small
+collection of helpful scripts.")
+    (license license:gpl3+)))
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#52116; Package guix-patches. (Fri, 23 Dec 2022 23:18:01 GMT) Full text and rfc822 format available.

Message #14 received at 52116 <at> debbugs.gnu.org (full text, mbox):

From: Morgan.J.Smith <at> outlook.com
To: 52116 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Subject: [PATCH v2 1/2] gnu: Add python-pyglet.
Date: Fri, 23 Dec 2022 18:08:31 -0500
From: Morgan Smith <Morgan.J.Smith <at> outlook.com>

* gnu/packages/python-xyz.scm (python-pyglet): New variable.
---

I updated the patches with the latest style.  python-pyglet has released a version 2 but printrun doesn't work with that.  Everything still works fine.  I would appreciate a review

 gnu/packages/python-xyz.scm | 58 +++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ee25a2d655..e609507032 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -4973,6 +4973,64 @@ (define-public python-doc8
 text styles of documentation.")
     (license license:asl2.0)))
 
+(define-public python-pyglet
+  (package
+    (name "python-pyglet")
+    (version "1.5.27")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "pyglet" version ".zip"))
+              (sha256
+               (base32
+                "01ghxgkaiw1m5gp498rd58vl8m5nvbyn95xna7yi0fqz8mky002d"))))
+    (build-system python-build-system)
+    (inputs (list mesa glu freetype fontconfig libx11))
+    (native-inputs (list python-pytest python-pytest-cov python-pillow
+                         xorg-server-for-tests unzip))
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'fix-paths
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "pyglet/gl/lib_glx.py"
+                (("'GL'")
+                 (string-append "'"
+                                (search-input-file inputs
+                                                   "lib/libGL.so") "'"))
+                (("'GLU'")
+                 (string-append "'"
+                                (search-input-file inputs
+                                                   "lib/libGLU.so")
+                                "'")))
+              (substitute* "pyglet/font/freetype_lib.py"
+                (("'freetype'")
+                 (string-append "'"
+                                (search-input-file inputs
+                                                   "lib/libfreetype.so") "'")))
+              (substitute* "pyglet/font/fontconfig.py"
+                (("'fontconfig'")
+                 (string-append "'"
+                                (search-input-file inputs
+                                                   "lib/libfontconfig.so") "'")))
+              (substitute* "pyglet/libs/x11/xlib.py"
+                (("'X11'")
+                 (string-append "'"
+                                (search-input-file inputs
+                                                   "lib/libX11.so")
+                                "'")))))
+          (replace 'check
+            (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+              (when tests?
+                (add-installed-pythonpath inputs outputs)
+                (system "Xvfb :1 &")
+                (setenv "DISPLAY" ":1")
+                (invoke "pytest" "tests/unit")))))))
+    (home-page "http://pyglet.readthedocs.io/en/latest/")
+    (synopsis "Cross-platform windowing and multimedia library")
+    (description "Cross-platform windowing and multimedia library")
+    (license license:bsd-3)))
+
 (define-public python-pygments
   (package
     (name "python-pygments")
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#52116; Package guix-patches. (Fri, 23 Dec 2022 23:18:02 GMT) Full text and rfc822 format available.

Message #17 received at 52116 <at> debbugs.gnu.org (full text, mbox):

From: Morgan.J.Smith <at> outlook.com
To: 52116 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Subject: [PATCH v2 2/2] gnu: Add printrun.
Date: Fri, 23 Dec 2022 18:08:32 -0500
From: Morgan Smith <Morgan.J.Smith <at> outlook.com>

* gnu/packages/printers.scm (printrun): New variable.
---
 gnu/packages/printers.scm | 72 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 71 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/printers.scm b/gnu/packages/printers.scm
index e7761070e0..1abc99d64d 100644
--- a/gnu/packages/printers.scm
+++ b/gnu/packages/printers.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2022 Morgan Smith <Morgan.J.Smith <at> outlook.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,13 +19,20 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages printers)
+  #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages libffi)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages qt))
+  #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages wxwidgets)
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages xorg))
 
 ;; This is a module for packages related to printer-like devices, but not
 ;; related to CUPS.
@@ -68,3 +76,65 @@ (define-public robocut
 with Graphtec and Sihouette plotting cutters using an SVG file as its input.")
     (home-page "http://robocut.org")
     (license license:gpl3+)))
+
+(define-public printrun
+  (package
+    (name "printrun")
+    (version "2.0.0rc8")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/kliment/Printrun")
+                    (commit (string-append "printrun-" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0bvwrfhmn2km03fp343bd9ddjxv8sp3d0qdxk786rflw4yksbxgn"))))
+    (build-system python-build-system)
+    (arguments
+     (list #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'patch-files
+                          (lambda _
+                            (substitute* "requirements.txt"
+                              (("== 4.1.0")
+                               ">= 4.0.0")
+                              (("dbus-python.*")
+                               ""))
+                            (delete-file "printrun/power/osx.py")
+                            (delete-file "printrun/packer.py")
+                            (substitute* "printrun/utils.py"
+                              (("shared_pronterface_images_dir = .*")
+                               (string-append
+                                "shared_pronterface_images_dir = \""
+                                #$output "/share/pronterface/images\"\n"))
+                              (("shared_pixmaps_dir = .*")
+                               (string-append "shared_pixmaps_dir = \""
+                                              #$output "/share/pixmaps\"\n"))
+                              (("shared_pronterface_dir = .*")
+                               (string-append "shared_pixmaps_dir = \""
+                                              #$output
+                                              "/share/pronterface\"\n")))))
+                        (add-before 'check 'setup-display
+                          (lambda* (#:key tests? #:allow-other-keys)
+                            (when tests?
+                              (system "Xvfb :1 &")
+                              (setenv "DISPLAY" ":1")))))))
+    (inputs (list python-appdirs
+                  python-cairocffi
+                  python-cairosvg
+                  python-cffi
+                  python-dbus
+                  python-lxml
+                  python-numpy
+                  python-psutil
+                  python-pyglet
+                  python-pyserial
+                  python-wxpython))
+    (native-inputs (list python-cython xorg-server-for-tests))
+    (home-page "https://github.com/kliment/Printrun/")
+    (synopsis
+     "Printrun is a full suite of host interfaces for 3D printers and CNC")
+    (description
+     "Printrun consists of printcore, pronsole and pronterface, and a small
+collection of helpful scripts.")
+    (license license:gpl3+)))
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#52116; Package guix-patches. (Fri, 18 Oct 2024 20:21:01 GMT) Full text and rfc822 format available.

Message #20 received at 52116 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 52116 <at> debbugs.gnu.org
Subject: [PATCH 0/2] gnu: Add printrun.
Date: Fri, 18 Oct 2024 21:18:55 +0100
[Message part 1 (text/plain, inline)]
Hi,

I've refreshed python-pyglet with combined efforts from:

- 48467 [PATCH] gnu: Add python-pyglet.
;;; Copyright © 2021 Adam Kandur <kefironpremise <at> gmail.com>
- 50505 [PATCH 00/12] gnu: Add python-manim
;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k <at> ruhr-uni-bochum.de>
- 52116 [PATCH 0/2] gnu: Add printrun.
;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith <at> outlook.com>
- 67131 [PATCH 0/7] gnu: Add tuxemon.
;;; Copyright © 2023 Adam Faiz <adam.faiz <at> disroot.org>

Pushed as 88471af678959b1eb4e357a47293030d05de8658 to master.

--
Thanks,
Oleg
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#52116; Package guix-patches. (Sun, 23 Feb 2025 19:40:01 GMT) Full text and rfc822 format available.

Message #23 received at 52116 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: 52116 <at> debbugs.gnu.org
Subject: Currently blocked due to python-pyglet
Date: Sun, 23 Feb 2025 14:38:53 -0500
Hello!

I'm still a little upset this didn't get reviewed back when I submitted
in 2021 or when I resubmitted it in 2022.

I was planning to resubmit it yet again but we currently only have
python-pyglet 2 in guix.

printrun is planning on migrating to python-pyglet 2 but currently they
are still on version 1.

Here is the relevant issue:
https://github.com/kliment/Printrun/issues/1468

Thanks,

Morgan




This bug report was last modified 108 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.