~ruther/guix-local

80581a283397e3cb47647661ce2c53d2c3e19864 — Sharlatan Hellseher 1 year, 2 months ago 40aefa6
gnu: python-pysdl2: Move to python-graphics.

* gnu/packages/python-xyz.scm (python-pysdl2): Move from here ...
* gnu/packages/python-graphics.scm: ... to here.

Change-Id: I54aba5426a666063c6aa4aedc004ca3c3faa54bb
2 files changed, 61 insertions(+), 60 deletions(-)

M gnu/packages/python-graphics.scm
M gnu/packages/python-xyz.scm
M gnu/packages/python-graphics.scm => gnu/packages/python-graphics.scm +61 -0
@@ 5,6 5,7 @@
;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
;;; Copyright © 2021, 2023 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
;;; Copyright © 2022 Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2022 Ryan Prior <rprior@protonmail.com>
;;; Copyright © 2023 Adam Faiz <adam.faiz@disroot.org>


@@ 613,6 614,66 @@ library.")
    (description
     "This is the Cython-coded accelerator module for PyOpenGL.")))

(define-public python-pysdl2
  (package
    (name "python-pysdl2")
    (version "0.9.17")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "PySDL2" version))
       (sha256
        (base32 "19id1qswgcj4v4j5kn49shq1xxx3slhjpm0102w87mczsdbi1rck"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:tests? #f ;; Requires /dev/dri, OpenGL module, etc.
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'patch-paths
            (lambda _
              (substitute* "sdl2/dll.py"
                ;; Disable pysdl2-dll. It can't be packaged on GNU Guix
                ;; as it duplicates an existing package (sdl2).
                (("prepath = os\\.getenv\\('PYSDL2_DLL_PATH'\\)")
                 "prepath = \"system\"")
                (("^import sdl2dll$") "")
                (("postpath = os\\.getenv\\('PYSDL2_DLL_PATH'\\)")
                 "postpath = \"system\"")
                (("DLL\\(.*, os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)\\)")
                 (format #f "DLL('SDL2', ['SDL2', 'SDL2-2.0', 'SDL2-2.0.0'], '~a/lib')"
                         #$(this-package-input "sdl2"))))
              (substitute* "sdl2/sdlimage.py"
                (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)")
                 (format #f "'~a/~a'" #$(this-package-input "sdl2-image")
                         "lib/libSDL2_image.so")))
              (substitute* "sdl2/sdlgfx.py"
                (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)")
                 (format #f "'~a/~a'" #$(this-package-input "sdl2-gfx")
                         "lib/libSDL2_gfx.so")))
              (substitute* "sdl2/sdlmixer.py"
                (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)")
                 (format #f "'~a/~a'" #$(this-package-input "sdl2-mixer")
                         "lib/libSDL2_mixer.so")))
              (substitute* "sdl2/sdlttf.py"
                (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)")
                 (format #f "'~a/~a'" #$(this-package-input "sdl2-ttf")
                         "lib/libSDL2_ttf.so"))))))))
    (native-inputs
     (list python-setuptools
           python-wheel))
    (inputs
     (list sdl2 sdl2-image sdl2-gfx sdl2-mixer sdl2-ttf))
    (home-page "https://github.com/py-sdl/py-sdl2")
    (synopsis "Python bindings around the SDL2 game development library")
    (description
     "PySDL2 is a pure Python wrapper around the
@code{SDL2},@code{SDL2_mixer}, @code{SDL2_image}, @code{SDL2_ttf}, and
@code{SDL2_gfx} libraries.  Instead of relying on C code, it uses the built-in
ctypes module to interface with SDL2, and provides simple Python classes and
wrappers for common SDL2 functionality.")
    (license license:cc0)))

(define-public python-vispy
  (package
    (name "python-vispy")

M gnu/packages/python-xyz.scm => gnu/packages/python-xyz.scm +0 -60
@@ 7675,66 7675,6 @@ any @file{.pug} source into different template languages: Django, Jinja2,
Mako, and Tornado.")
    (license license:expat))) ;; MIT

(define-public python-pysdl2
  (package
    (name "python-pysdl2")
    (version "0.9.17")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "PySDL2" version))
       (sha256
        (base32 "19id1qswgcj4v4j5kn49shq1xxx3slhjpm0102w87mczsdbi1rck"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:tests? #f ;; Requires /dev/dri, OpenGL module, etc.
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'patch-paths
            (lambda _
              (substitute* "sdl2/dll.py"
                ;; Disable pysdl2-dll. It can't be packaged on GNU Guix
                ;; as it duplicates an existing package (sdl2).
                (("prepath = os\\.getenv\\('PYSDL2_DLL_PATH'\\)")
                 "prepath = \"system\"")
                (("^import sdl2dll$") "")
                (("postpath = os\\.getenv\\('PYSDL2_DLL_PATH'\\)")
                 "postpath = \"system\"")
                (("DLL\\(.*, os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)\\)")
                 (format #f "DLL('SDL2', ['SDL2', 'SDL2-2.0', 'SDL2-2.0.0'], '~a/lib')"
                         #$(this-package-input "sdl2"))))
              (substitute* "sdl2/sdlimage.py"
                (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)")
                 (format #f "'~a/~a'" #$(this-package-input "sdl2-image")
                         "lib/libSDL2_image.so")))
              (substitute* "sdl2/sdlgfx.py"
                (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)")
                 (format #f "'~a/~a'" #$(this-package-input "sdl2-gfx")
                         "lib/libSDL2_gfx.so")))
              (substitute* "sdl2/sdlmixer.py"
                (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)")
                 (format #f "'~a/~a'" #$(this-package-input "sdl2-mixer")
                         "lib/libSDL2_mixer.so")))
              (substitute* "sdl2/sdlttf.py"
                (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)")
                 (format #f "'~a/~a'" #$(this-package-input "sdl2-ttf")
                         "lib/libSDL2_ttf.so"))))))))
    (native-inputs
     (list python-setuptools
           python-wheel))
    (inputs
     (list sdl2 sdl2-image sdl2-gfx sdl2-mixer sdl2-ttf))
    (home-page "https://github.com/py-sdl/py-sdl2")
    (synopsis "Python bindings around the SDL2 game development library")
    (description
     "PySDL2 is a pure Python wrapper around the
@code{SDL2},@code{SDL2_mixer}, @code{SDL2_image}, @code{SDL2_ttf}, and
@code{SDL2_gfx} libraries.  Instead of relying on C code, it uses the built-in
ctypes module to interface with SDL2, and provides simple Python classes and
wrappers for common SDL2 functionality.")
    (license license:cc0)))

(define-public python-pystache
  (package
    (name "python-pystache")