all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Morgan.J.Smith@outlook.com
To: 52116@debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith@outlook.com>
Subject: [bug#52116] [PATCH v2 1/2] gnu: Add python-pyglet.
Date: Fri, 23 Dec 2022 18:08:31 -0500	[thread overview]
Message-ID: <DM5PR03MB3163CBCF33AAAC92EE230DD6C5E99@DM5PR03MB3163.namprd03.prod.outlook.com> (raw)
In-Reply-To: <BYAPR05MB402374B9DB45FB4583BAE1B2C5629@BYAPR05MB4023.namprd05.prod.outlook.com>

From: Morgan Smith <Morgan.J.Smith@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





      parent reply	other threads:[~2022-12-23 23:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25 22:26 [bug#52116] [PATCH 0/2] gnu: Add printrun Morgan.J.Smith
2021-11-26  0:58 ` [bug#52116] [PATCH 1/2] gnu: Add python-pyglet Morgan.J.Smith
2022-12-23 23:08 ` Morgan.J.Smith [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM5PR03MB3163CBCF33AAAC92EE230DD6C5E99@DM5PR03MB3163.namprd03.prod.outlook.com \
    --to=morgan.j.smith@outlook.com \
    --cc=52116@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.