diff options
| author | Jean-Pierre De Jesus DIAZ <me@jeandudey.tech> | 2022-06-10 19:57:31 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2022-06-17 15:31:34 +0200 |
| commit | d18f701aa12e1b881bea743d076ca89f96798f64 (patch) | |
| tree | c20b5b4474e3a2005b9951fa95154035e73f3fc5 /gnu | |
| parent | 88f6776728bbe1fd21e4b3dfef2ae291ba074067 (diff) | |
gnu: Add python-pysdl2.
* gnu/packages/python-xyz.scm (python-pysdl2): New variable.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/python-xyz.scm | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 4b8e63890f1..285863df075 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm | |||
| @@ -123,6 +123,7 @@ | |||
| 123 | ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com> | 123 | ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com> |
| 124 | ;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com> | 124 | ;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com> |
| 125 | ;;; Copyright © 2022 Paul A. Patience <paul@apatience.com> | 125 | ;;; Copyright © 2022 Paul A. Patience <paul@apatience.com> |
| 126 | ;;; Copyright © 2022 Jean-Pierre De Jesus DIAZ <me@jeandudey.tech> | ||
| 126 | ;;; | 127 | ;;; |
| 127 | ;;; This file is part of GNU Guix. | 128 | ;;; This file is part of GNU Guix. |
| 128 | ;;; | 129 | ;;; |
| @@ -3901,6 +3902,71 @@ adds a 'now' tag providing a convenient access to the arrow.now() API from | |||
| 3901 | templates. A format string can be provided to control the output.") | 3902 | templates. A format string can be provided to control the output.") |
| 3902 | (license license:expat))) | 3903 | (license license:expat))) |
| 3903 | 3904 | ||
| 3905 | (define-public python-pysdl2 | ||
| 3906 | (package | ||
| 3907 | (name "python-pysdl2") | ||
| 3908 | (version "0.9.11") | ||
| 3909 | (source (origin | ||
| 3910 | (method url-fetch) | ||
| 3911 | (uri (pypi-uri "PySDL2" version)) | ||
| 3912 | (sha256 | ||
| 3913 | (base32 | ||
| 3914 | "19id1qswgcj4v4j5kn49shq1xxx3slhjpm0102w87mczsdbi1rck")))) | ||
| 3915 | (build-system python-build-system) | ||
| 3916 | (arguments | ||
| 3917 | (list #:tests? #f ;; Requires /dev/dri, OpenGL module, etc. | ||
| 3918 | #:phases | ||
| 3919 | #~(modify-phases %standard-phases | ||
| 3920 | (add-after 'unpack 'patch-paths | ||
| 3921 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 3922 | (substitute* "sdl2/dll.py" | ||
| 3923 | ;; Disable pysdl2-dll. It can't be packaged on GNU Guix | ||
| 3924 | ;; as it duplicates an existing package (sdl2). | ||
| 3925 | (("prepath = os\\.getenv\\('PYSDL2_DLL_PATH'\\)") | ||
| 3926 | "prepath = \"system\"") | ||
| 3927 | (("^import sdl2dll$") "") | ||
| 3928 | (("postpath = os\\.getenv\\('PYSDL2_DLL_PATH'\\)") | ||
| 3929 | "postpath = \"system\"") | ||
| 3930 | (("DLL\\(.*, os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)\\)") | ||
| 3931 | (string-append | ||
| 3932 | "DLL(\"SDL2\", [\"SDL2\", \"SDL2-2.0\", \"SDL2-2.0.0\"], \"" | ||
| 3933 | (dirname (search-input-file inputs "/lib/libSDL2.so")) | ||
| 3934 | "\")"))) | ||
| 3935 | (substitute* "sdl2/sdlimage.py" | ||
| 3936 | (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)") | ||
| 3937 | (string-append | ||
| 3938 | "\"" | ||
| 3939 | (dirname (search-input-file inputs "/lib/libSDL2_image.so")) | ||
| 3940 | "\""))) | ||
| 3941 | (substitute* "sdl2/sdlgfx.py" | ||
| 3942 | (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)") | ||
| 3943 | (string-append | ||
| 3944 | "\"" | ||
| 3945 | (dirname (search-input-file inputs "/lib/libSDL2_gfx.so")) | ||
| 3946 | "\""))) | ||
| 3947 | (substitute* "sdl2/sdlmixer.py" | ||
| 3948 | (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)") | ||
| 3949 | (string-append | ||
| 3950 | "\"" | ||
| 3951 | (dirname (search-input-file inputs "/lib/libSDL2_mixer.so")) | ||
| 3952 | "\""))) | ||
| 3953 | (substitute* "sdl2/sdlttf.py" | ||
| 3954 | (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)") | ||
| 3955 | (string-append | ||
| 3956 | "\"" | ||
| 3957 | (dirname (search-input-file inputs "/lib/libSDL2_ttf.so")) | ||
| 3958 | "\"")))))))) | ||
| 3959 | (inputs | ||
| 3960 | (list sdl2 sdl2-image sdl2-gfx sdl2-mixer sdl2-ttf)) | ||
| 3961 | (home-page "https://github.com/py-sdl/py-sdl2") | ||
| 3962 | (synopsis "Python bindings around the SDL2 game development library") | ||
| 3963 | (description "PySDL2 is a pure Python wrapper around the @code{SDL2}, | ||
| 3964 | @code{SDL2_mixer}, @code{SDL2_image}, @code{SDL2_ttf}, and @code{SDL2_gfx} | ||
| 3965 | libraries. Instead of relying on C code, it uses the built-in ctypes module | ||
| 3966 | to interface with SDL2, and provides simple Python classes and wrappers for | ||
| 3967 | common SDL2 functionality.") | ||
| 3968 | (license license:cc0))) | ||
| 3969 | |||
| 3904 | (define-public python-pystache | 3970 | (define-public python-pystache |
| 3905 | (package | 3971 | (package |
| 3906 | (name "python-pystache") | 3972 | (name "python-pystache") |
