diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-10-06 20:26:14 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-10-18 21:09:33 +0100 |
| commit | 88471af678959b1eb4e357a47293030d05de8658 (patch) | |
| tree | 77d87f04f79b086a35d4001f3c9253a970852969 /gnu/packages/python-graphics.scm | |
| parent | 194d8e51cf43b697914c5a1b78dda77fd4adb886 (diff) | |
gnu: Add python-pyglet.
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@gmail.com>
Co-Authored-By: Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
Co-Authored-By: Morgan Smith <Morgan.J.Smith@outlook.com>
Co-Authored-By: Adam Faiz <adam.faiz@disroot.org>
Diffstat (limited to 'gnu/packages/python-graphics.scm')
| -rw-r--r-- | gnu/packages/python-graphics.scm | 152 |
1 files changed, 151 insertions, 1 deletions
diff --git a/gnu/packages/python-graphics.scm b/gnu/packages/python-graphics.scm index ef981bd8d76..d0b4a1df74e 100644 --- a/gnu/packages/python-graphics.scm +++ b/gnu/packages/python-graphics.scm | |||
| @@ -1,4 +1,9 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2021 Adam Kandur <kefironpremise@gmail.com> | ||
| 3 | ;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> | ||
| 4 | ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com> | ||
| 5 | ;;; Copyright © 2023 Adam Faiz <adam.faiz@disroot.org> | ||
| 6 | ;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com> | ||
| 2 | 7 | ||
| 3 | (define-module (gnu packages python-graphics) | 8 | (define-module (gnu packages python-graphics) |
| 4 | #:use-module ((guix licenses) #:prefix license:) | 9 | #:use-module ((guix licenses) #:prefix license:) |
| @@ -8,9 +13,18 @@ | |||
| 8 | #:use-module (guix gexp) | 13 | #:use-module (guix gexp) |
| 9 | #:use-module (guix packages) | 14 | #:use-module (guix packages) |
| 10 | #:use-module (gnu packages) | 15 | #:use-module (gnu packages) |
| 16 | #:use-module (gnu packages audio) | ||
| 11 | #:use-module (gnu packages check) | 17 | #:use-module (gnu packages check) |
| 18 | #:use-module (gnu packages compression) | ||
| 19 | #:use-module (gnu packages fontutils) | ||
| 20 | #:use-module (gnu packages gl) | ||
| 21 | #:use-module (gnu packages base) | ||
| 22 | #:use-module (gnu packages gtk) | ||
| 23 | #:use-module (gnu packages pulseaudio) | ||
| 12 | #:use-module (gnu packages python-build) | 24 | #:use-module (gnu packages python-build) |
| 13 | #:use-module (gnu packages python-xyz)) | 25 | #:use-module (gnu packages python-xyz) |
| 26 | #:use-module (gnu packages video) | ||
| 27 | #:use-module (gnu packages xorg)) | ||
| 14 | 28 | ||
| 15 | ;;; Commentary: | 29 | ;;; Commentary: |
| 16 | ;;; | 30 | ;;; |
| @@ -21,6 +35,142 @@ | |||
| 21 | ;;; | 35 | ;;; |
| 22 | ;;; Code: | 36 | ;;; Code: |
| 23 | 37 | ||
| 38 | (define-public python-pyglet | ||
| 39 | (package | ||
| 40 | (name "python-pyglet") | ||
| 41 | (version "2.0.18") | ||
| 42 | (source | ||
| 43 | (origin | ||
| 44 | (method url-fetch) | ||
| 45 | (uri (pypi-uri "pyglet" version)) | ||
| 46 | (sha256 | ||
| 47 | (base32 "1p4rizj81vfqxal288m3afbrgk0il3w7k5kmhai2sah8f26j7ybw")))) | ||
| 48 | (build-system pyproject-build-system) | ||
| 49 | (arguments | ||
| 50 | (list | ||
| 51 | #:test-flags | ||
| 52 | #~(list "tests" | ||
| 53 | "--ignore=tests/interactive" | ||
| 54 | ;; All tests errored | ||
| 55 | "--ignore=tests/integration/media/test_openal.py" | ||
| 56 | "--ignore=tests/integration/text/test_empty_document.py" | ||
| 57 | ;; Tests failed | ||
| 58 | "-k" (string-append "not test2" | ||
| 59 | " and not test5" | ||
| 60 | " and not testPad" | ||
| 61 | " and not testPad" | ||
| 62 | " and not testRange" | ||
| 63 | " and not testRect" | ||
| 64 | " and not testRect" | ||
| 65 | " and not testSet" | ||
| 66 | " and not testSquare" | ||
| 67 | " and not testSquare" | ||
| 68 | " and not testTuple" | ||
| 69 | " and not testTupleRange" | ||
| 70 | " and not test_context_noshare_texture" | ||
| 71 | " and not test_context_share_texture" | ||
| 72 | " and not test_method" | ||
| 73 | " and not test_openal_listener" | ||
| 74 | " and not test_parse_all_controller_mappings" | ||
| 75 | " and not test_player_play" | ||
| 76 | " and not test_player_play_multiple" | ||
| 77 | " and not test_stream_write_needed" | ||
| 78 | " and not test_window_caption" | ||
| 79 | " and not test_window_caption_from_argv")) | ||
| 80 | #:phases | ||
| 81 | #~(modify-phases %standard-phases | ||
| 82 | (add-after 'unpack 'patch-lib-paths | ||
| 83 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 84 | (substitute* (list "pyglet/font/fontconfig.py" | ||
| 85 | "pyglet/font/freetype_lib.py" | ||
| 86 | "pyglet/gl/lib_glx.py" | ||
| 87 | "pyglet/input/linux/evdev.py" | ||
| 88 | "pyglet/libs/egl/egl.py" | ||
| 89 | "pyglet/libs/egl/lib.py" | ||
| 90 | "pyglet/libs/x11/xf86vmode.py" | ||
| 91 | "pyglet/libs/x11/xinerama.py" | ||
| 92 | "pyglet/libs/x11/xlib.py" | ||
| 93 | "pyglet/libs/x11/xsync.py" | ||
| 94 | "pyglet/media/drivers/openal/lib_openal.py" | ||
| 95 | "pyglet/media/drivers/pulse/lib_pulseaudio.py") | ||
| 96 | (("'EGL'") | ||
| 97 | (format #f "'~a/~a'" #$(this-package-input "mesa") | ||
| 98 | "lib/libEGL.so")) | ||
| 99 | (("\"fontconfig\"") | ||
| 100 | (format #f "'~a/~a'" #$(this-package-input "fontconfig-minimal") | ||
| 101 | "lib/libfontconfig.so")) | ||
| 102 | (("\"freetype\"") | ||
| 103 | (format #f "'~a/~a'" #$(this-package-input "freetype") | ||
| 104 | "lib/libfreetype.so")) | ||
| 105 | (("'GL'") | ||
| 106 | (format #f "'~a/~a'" #$(this-package-input "mesa") | ||
| 107 | "lib/libGL.so")) | ||
| 108 | (("'GLU'") | ||
| 109 | (format #f "'~a/~a'" #$(this-package-input "glu") | ||
| 110 | "lib/libGLU.so")) | ||
| 111 | (("'X11'") | ||
| 112 | (format #f "'~a/~a'" #$(this-package-input "libx11") | ||
| 113 | "lib/libX11.so")) | ||
| 114 | (("'Xext'") | ||
| 115 | (format #f "'~a/~a'" #$(this-package-input "libxext") | ||
| 116 | "lib/libXext.so")) | ||
| 117 | (("'Xinerama'") | ||
| 118 | (format #f "'~a/~a'" #$(this-package-input "libxinerama") | ||
| 119 | "lib/libXinerama.so")) | ||
| 120 | (("'Xxf86vm'") | ||
| 121 | (format #f "'~a/~a'" #$(this-package-input "libxxf86vm") | ||
| 122 | "lib/libXxf86vm.so")) | ||
| 123 | (("'c'") | ||
| 124 | (format #f "'~a/~a'" #$(this-package-input "glibc") | ||
| 125 | "lib/libc.so")) | ||
| 126 | (("'gdk-x11-2.0'") | ||
| 127 | (format #f "'~a/~a'" #$(this-package-input "gtk+") | ||
| 128 | "lib/gdk-pixbuf-2.0.so")) | ||
| 129 | (("'gdk_pixbuf-2.0'") | ||
| 130 | (format #f "'~a/~a'" #$(this-package-input "gdk-pixbuf") | ||
| 131 | "lib/libgdk_pixbuf-2.0.so")) | ||
| 132 | (("'openal'") | ||
| 133 | (format #f "'~a/~a'" #$(this-package-input "openal") | ||
| 134 | "lib/libopenal.so")) | ||
| 135 | (("'pulse'") | ||
| 136 | (format #f "'~a/~a'" #$(this-package-input "pulseaudio") | ||
| 137 | "lib/libpulse.so"))))) | ||
| 138 | (add-before 'check 'prepare-test-environment | ||
| 139 | (lambda _ | ||
| 140 | ;; The test suite requires a running X server. | ||
| 141 | (system "Xvfb :1 &") | ||
| 142 | (setenv "DISPLAY" ":1") | ||
| 143 | (setenv "HOME" "/tmp") | ||
| 144 | (setenv "PYGLET_HEADLESS" "True")))))) | ||
| 145 | (native-inputs | ||
| 146 | (list python-flit-core | ||
| 147 | python-pytest | ||
| 148 | unzip | ||
| 149 | xorg-server-for-tests)) | ||
| 150 | (inputs | ||
| 151 | (list ffmpeg | ||
| 152 | fontconfig | ||
| 153 | freeglut | ||
| 154 | freetype | ||
| 155 | gdk-pixbuf | ||
| 156 | glibc | ||
| 157 | glu | ||
| 158 | gtk+ | ||
| 159 | libx11 | ||
| 160 | libxext | ||
| 161 | libxinerama | ||
| 162 | libxxf86vm | ||
| 163 | mesa | ||
| 164 | openal | ||
| 165 | pulseaudio)) | ||
| 166 | (home-page "https://github.com/pyglet/pyglet") | ||
| 167 | (synopsis "Windowing and multimedia library") | ||
| 168 | (description | ||
| 169 | "Pyglet is a Python library for developing games and other visually-rich | ||
| 170 | applications. It supports windowing, user interface event handling, | ||
| 171 | Joysticks, OpenGL graphics, loading images and videos, playing sounds and | ||
| 172 | music." ) | ||
| 173 | (license license:bsd-3))) | ||
| 24 | 174 | ||
| 25 | ;;; | 175 | ;;; |
| 26 | ;;; Avoid adding new packages to the end of this file. To reduce the chances | 176 | ;;; Avoid adding new packages to the end of this file. To reduce the chances |
