gnu: python-pysdl2: Fix indentation.

* gnu/packages/python-xyz.scm (python-pysdl2): Fix indentation.

Change-Id: I5171a1a06640fcb6bafaa9ae77a4202098130cef
This commit is contained in:
Sharlatan Hellseher 2025-05-06 22:52:47 +01:00
parent e844f7bdbc
commit 3387675d84
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

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