GNU bug report logs - #73747
[PATCH 0/2] gnu: Add python-pyglet.

Previous Next

Package: guix-patches;

Reported by: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Date: Fri, 11 Oct 2024 17:08:02 UTC

Severity: normal

Tags: patch

Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73747 in the body.
You can then email your comments to 73747 AT debbugs.gnu.org in the normal way.

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

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


Report forwarded to lars <at> 6xq.net, marius <at> gnu.org, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, tanguy <at> bioneland.org, jgart <at> dismail.de, guix-patches <at> gnu.org:
bug#73747; Package guix-patches. (Fri, 11 Oct 2024 17:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
New bug report received and forwarded. Copy sent to lars <at> 6xq.net, marius <at> gnu.org, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, tanguy <at> bioneland.org, jgart <at> dismail.de, guix-patches <at> gnu.org. (Fri, 11 Oct 2024 17:08:02 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Daniel Meißner <daniel.meissner-i4k <at> ruhr-uni-bochum.de>,
 Adam Kandur <kefironpremise <at> gmail.com>,
 Sharlatan Hellseher <sharlatanus <at> gmail.com>, Adam Faiz <adam.faiz <at> disroot.org>,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>,
 Morgan Smith <Morgan.J.Smith <at> outlook.com>, jgart <jgart <at> dismail.de>
Subject: [PATCH 0/2] gnu: Add python-pyglet.
Date: Fri, 11 Oct 2024 16:25:36 +0100
Hi Guix!

While checking python-science module for enabling optional packages for
python-trimesh:

-  python-pycollada   ; not packed yet, optional
-  python-pyglet      ; not packed yet, optional

I've packed python-pycollada as a part of Astro update for this month, it
would required to complete long packaging chain.

After check issues for python-pyglet I've found a few attempts to pack it
already in:

- 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>

This patch series introduces a new module - python-graphics (following naming
style taken from rust-team), and the latest python-pyglet with all bindings
implemented. Some tests are disabled, but most of them passed and module loads
successfly.

In the future I'd like to move some related packages from chunky python-xyz
into python-graphics.

Thanks,
Oleg

Sharlatan Hellseher (2):
  gnu: Add packages/python-graphics module.
  gnu: Add python-pyglet.

 gnu/local.mk                     |   1 +
 gnu/packages/python-graphics.scm | 178 +++++++++++++++++++++++++++++++
 2 files changed, 179 insertions(+)
 create mode 100644 gnu/packages/python-graphics.scm


base-commit: 053accdde356eaf84751b16d3aaf1425f410a70b
-- 
2.46.0





Information forwarded to lars <at> 6xq.net, marius <at> gnu.org, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, tanguy <at> bioneland.org, jgart <at> dismail.de, guix-patches <at> gnu.org:
bug#73747; Package guix-patches. (Fri, 11 Oct 2024 17:42:02 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 73747 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 1/2] gnu: Add packages/python-graphics module.
Date: Fri, 11 Oct 2024 18:40:09 +0100
* gnu/packages/python-graphics.scm: New file.
* gnu/local.mk: Add gnu/packages/python-graphics.scm to the scope.

Change-Id: I1d077c838ff1c3c014c3d699b539eaf8befd5084
---
 gnu/local.mk                     |  1 +
 gnu/packages/python-graphics.scm | 28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 gnu/packages/python-graphics.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index afff609501..b47d4dc917 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -561,6 +561,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/python-check.scm			\
   %D%/packages/python-compression.scm		\
   %D%/packages/python-crypto.scm		\
+  %D%/packages/python-graphics.scm			\
   %D%/packages/python-science.scm		\
   %D%/packages/python-web.scm			\
   %D%/packages/python-xyz.scm			\
diff --git a/gnu/packages/python-graphics.scm b/gnu/packages/python-graphics.scm
new file mode 100644
index 0000000000..ef981bd8d7
--- /dev/null
+++ b/gnu/packages/python-graphics.scm
@@ -0,0 +1,28 @@
+;;; GNU Guix --- Functional package management for GNU
+
+(define-module (gnu packages python-graphics)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module ((guix build-system python) #:select (pypi-uri))
+  #:use-module (guix build-system pyproject)
+  #:use-module (guix download)
+  #:use-module (guix gexp)
+  #:use-module (guix packages)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages python-build)
+  #:use-module (gnu packages python-xyz))
+
+;;; Commentary:
+;;;
+;;; Python modules which are meant to be used in GUI creation or mainly are
+;;; bindings to low level libraries such as Glue, Mesa, OpenGL, Xorg etc.
+;;;
+;;; Please: Try to add new module packages in alphabetic order.
+;;;
+;;; Code:
+
+
+;;;
+;;; Avoid adding new packages to the end of this file. To reduce the chances
+;;; of a merge conflict, place them above in alphabetical order.
+;;;
-- 
2.46.0





Information forwarded to lars <at> 6xq.net, marius <at> gnu.org, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, tanguy <at> bioneland.org, jgart <at> dismail.de, guix-patches <at> gnu.org:
bug#73747; Package guix-patches. (Fri, 11 Oct 2024 17:52:01 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 73747 <at> debbugs.gnu.org
Cc: Daniel Meißner <daniel.meissner-i4k <at> ruhr-uni-bochum.de>,
 Morgan Smith <Morgan.J.Smith <at> outlook.com>,
 Adam Kandur <kefironpremise <at> gmail.com>,
 Sharlatan Hellseher <sharlatanus <at> gmail.com>, Adam Faiz <adam.faiz <at> disroot.org>
Subject: [PATCH 2/2] gnu: Add python-pyglet.
Date: Fri, 11 Oct 2024 18:50:17 +0100
This project was mentioned in #48467, #50505, #52116 and #67131. It's a
refreshed version with most of the bindings implemented.

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

Change-Id: I78718376bc2945184c32cb013309fbba2b2749d0
Co-Authored-By: Adam Kandur <kefironpremise <at> gmail.com>
Co-Authored-By: Daniel Meißner <daniel.meissner-i4k <at> ruhr-uni-bochum.de>
Co-Authored-By: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Co-Authored-By: Adam Faiz <adam.faiz <at> disroot.org>
---
 gnu/packages/python-graphics.scm | 152 ++++++++++++++++++++++++++++++-
 1 file changed, 151 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-graphics.scm b/gnu/packages/python-graphics.scm
index ef981bd8d7..d0b4a1df74 100644
--- a/gnu/packages/python-graphics.scm
+++ b/gnu/packages/python-graphics.scm
@@ -1,4 +1,9 @@
 ;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Adam Kandur <kefironpremise <at> gmail.com>
+;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k <at> ruhr-uni-bochum.de>
+;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith <at> outlook.com>
+;;; Copyright © 2023 Adam Faiz <adam.faiz <at> disroot.org>
+;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 
 (define-module (gnu packages python-graphics)
   #:use-module ((guix licenses) #:prefix license:)
@@ -8,9 +13,18 @@ (define-module (gnu packages python-graphics)
   #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (gnu packages)
+  #:use-module (gnu packages audio)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages gl)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python-build)
-  #:use-module (gnu packages python-xyz))
+  #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages video)
+  #:use-module (gnu packages xorg))
 
 ;;; Commentary:
 ;;;
@@ -21,6 +35,142 @@ (define-module (gnu packages python-graphics)
 ;;;
 ;;; Code:
 
+(define-public python-pyglet
+  (package
+    (name "python-pyglet")
+    (version "2.0.18")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pyglet" version))
+       (sha256
+        (base32 "1p4rizj81vfqxal288m3afbrgk0il3w7k5kmhai2sah8f26j7ybw"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-flags
+      #~(list "tests"
+              "--ignore=tests/interactive"
+              ;; All tests errored
+              "--ignore=tests/integration/media/test_openal.py"
+              "--ignore=tests/integration/text/test_empty_document.py"
+              ;; Tests failed
+              "-k" (string-append "not test2"
+                                  " and not test5"
+                                  " and not testPad"
+                                  " and not testPad"
+                                  " and not testRange"
+                                  " and not testRect"
+                                  " and not testRect"
+                                  " and not testSet"
+                                  " and not testSquare"
+                                  " and not testSquare"
+                                  " and not testTuple"
+                                  " and not testTupleRange"
+                                  " and not test_context_noshare_texture"
+                                  " and not test_context_share_texture"
+                                  " and not test_method"
+                                  " and not test_openal_listener"
+                                  " and not test_parse_all_controller_mappings"
+                                  " and not test_player_play"
+                                  " and not test_player_play_multiple"
+                                  " and not test_stream_write_needed"
+                                  " and not test_window_caption"
+                                  " and not test_window_caption_from_argv"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-lib-paths
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* (list "pyglet/font/fontconfig.py"
+                                 "pyglet/font/freetype_lib.py"
+                                 "pyglet/gl/lib_glx.py"
+                                 "pyglet/input/linux/evdev.py"
+                                 "pyglet/libs/egl/egl.py"
+                                 "pyglet/libs/egl/lib.py"
+                                 "pyglet/libs/x11/xf86vmode.py"
+                                 "pyglet/libs/x11/xinerama.py"
+                                 "pyglet/libs/x11/xlib.py"
+                                 "pyglet/libs/x11/xsync.py"
+                                 "pyglet/media/drivers/openal/lib_openal.py"
+                                 "pyglet/media/drivers/pulse/lib_pulseaudio.py")
+                (("'EGL'")
+                 (format #f "'~a/~a'" #$(this-package-input "mesa")
+                         "lib/libEGL.so"))
+                (("\"fontconfig\"")
+                 (format #f "'~a/~a'" #$(this-package-input "fontconfig-minimal")
+                         "lib/libfontconfig.so"))
+                (("\"freetype\"")
+                 (format #f "'~a/~a'" #$(this-package-input "freetype")
+                         "lib/libfreetype.so"))
+                (("'GL'")
+                 (format #f "'~a/~a'" #$(this-package-input "mesa")
+                         "lib/libGL.so"))
+                (("'GLU'")
+                 (format #f "'~a/~a'" #$(this-package-input "glu")
+                         "lib/libGLU.so"))
+                (("'X11'")
+                 (format #f "'~a/~a'" #$(this-package-input "libx11")
+                         "lib/libX11.so"))
+                (("'Xext'")
+                 (format #f "'~a/~a'" #$(this-package-input "libxext")
+                         "lib/libXext.so"))
+                (("'Xinerama'")
+                 (format #f "'~a/~a'" #$(this-package-input "libxinerama")
+                         "lib/libXinerama.so"))
+                (("'Xxf86vm'")
+                 (format #f "'~a/~a'" #$(this-package-input "libxxf86vm")
+                         "lib/libXxf86vm.so"))
+                (("'c'")
+                 (format #f "'~a/~a'" #$(this-package-input "glibc")
+                         "lib/libc.so"))
+                (("'gdk-x11-2.0'")
+                 (format #f "'~a/~a'" #$(this-package-input "gtk+")
+                         "lib/gdk-pixbuf-2.0.so"))
+                (("'gdk_pixbuf-2.0'")
+                 (format #f "'~a/~a'" #$(this-package-input "gdk-pixbuf")
+                         "lib/libgdk_pixbuf-2.0.so"))
+                (("'openal'")
+                 (format #f "'~a/~a'" #$(this-package-input "openal")
+                         "lib/libopenal.so"))
+                (("'pulse'")
+                 (format #f "'~a/~a'" #$(this-package-input "pulseaudio")
+                         "lib/libpulse.so")))))
+          (add-before 'check 'prepare-test-environment
+            (lambda _
+              ;; The test suite requires a running X server.
+              (system "Xvfb :1 &")
+              (setenv "DISPLAY" ":1")
+              (setenv "HOME" "/tmp")
+              (setenv "PYGLET_HEADLESS" "True"))))))
+    (native-inputs
+     (list python-flit-core
+           python-pytest
+           unzip
+           xorg-server-for-tests))
+    (inputs
+     (list ffmpeg
+           fontconfig
+           freeglut
+           freetype
+           gdk-pixbuf
+           glibc
+           glu
+           gtk+
+           libx11
+           libxext
+           libxinerama
+           libxxf86vm
+           mesa
+           openal
+           pulseaudio))
+    (home-page "https://github.com/pyglet/pyglet")
+    (synopsis "Windowing and multimedia library")
+    (description
+     "Pyglet is a Python library for developing games and other visually-rich
+applications.  It supports windowing, user interface event handling,
+Joysticks, OpenGL graphics, loading images and videos, playing sounds and
+music." )
+    (license license:bsd-3)))
 
 ;;;
 ;;; Avoid adding new packages to the end of this file. To reduce the chances
-- 
2.46.0





Reply sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
You have taken responsibility. (Sat, 19 Oct 2024 07:24:02 GMT) Full text and rfc822 format available.

Notification sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
bug acknowledged by developer. (Sat, 19 Oct 2024 07:24:02 GMT) Full text and rfc822 format available.

Message #16 received at 73747-done <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 73747-done <at> debbugs.gnu.org
Subject: [PATCH 0/2] gnu: Add python-pyglet.
Date: Sat, 19 Oct 2024 08:21:45 +0100
[Message part 1 (text/plain, inline)]
Pushed as 88471af678959b1eb4e357a47293030d05de8658 to master.

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

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 16 Nov 2024 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 215 days ago.

Previous Next


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