Vincent Legoll <vincent.leg...@gmail.com> writes:

>> Pygame's config.py is not finding smpeg-config. This will be fun! Anyone
>> with skill in Python is welcome to offer me assistance!
>
> Maybe I can help, could you elaborate on how to reproduce ?

Sure. Apply the libsmpeg patch and the attached Pygame patch to a copy
of the Guix repo and attempt to build python-pygame. The error is
contained in the build log. I'll copy it below:

starting phase `build'
running "python setup.py" with command "build" and parameters ()


WARNING, No "Setup" File Exists, Running "config.py"
Using UNIX configuration...

/gnu/store/b1yqjimbdh5bf9jnizd4h7yf110744j2-bash-4.3.42/bin/sh: smpeg-config: c
ommand not found                                                              

Hunting dependencies...
WARNING: "smpeg-config" failed!
SDL     : found 1.2.15
FONT    : not found
IMAGE   : not found
MIXER   : not found
SMPEG   : not found
PNG     : not found
JPEG    : not found
SCRAP   : found
PORTMIDI: not found
PORTTIME: not found


Warning, some of the pygame dependencies were not found. Pygame can still
compile and install, but games that depend on those missing dependencies
will not run. Would you like to continue the configuration? [Y/n]:Traceback (mo
st recent call last):                                                         
  File "setup.py", line 132, in <module>
    config.main()
  File "/tmp/guix-build-python-pygame-1.9.1.drv-0/pygame-1.9.1release/config.py
", line 137, in main                                                          
    deps = CFG.main()
  File "/tmp/guix-build-python-pygame-1.9.1.drv-0/pygame-1.9.1release/config_un
ix.py", line 180, in main                                                     
    will not run. Would you like to continue the configuration?"""):
  File "/tmp/guix-build-python-pygame-1.9.1.drv-0/pygame-1.9.1release/config_un
ix.py", line 24, in confirm                                                   
    reply = raw_input('\n' + message + ' [Y/n]:')
EOFError: EOF when reading a line
phase `build' failed after 0.8 seconds
builder for `/gnu/store/fgrm7ph1z050mldbzwg4s872373lqj1j-python-pygame-1.9.1.dr
v' failed with exit code 1                                                    
guix package: error: build failed: build of `/gnu/store/fgrm7ph1z050mldbzwg4s87
2373lqj1j-python-pygame-1.9.1.drv' failed 

From f15ce6a6050543ad6da623dd5758c114ec95fd60 Mon Sep 17 00:00:00 2001
From: Kei Kebreau <k...@openmailbox.org>
Date: Fri, 22 Jul 2016 17:06:11 -0400
Subject: [PATCH] gnu: Add python-pygame.

* gnu/packages/game-development.scm (python-pygame): Add python-pygame.
---
 gnu/packages/game-development.scm | 44 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/game-development.scm 
b/gnu/packages/game-development.scm
index 7067a71..e3ecc79 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -31,6 +31,7 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
@@ -41,6 +42,7 @@
   #:use-module (gnu packages gnunet)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages music)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages compression)
@@ -60,7 +62,8 @@
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages mp3)
-  #:use-module (gnu packages xml))
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages video))
 
 (define-public bullet
   (package
@@ -512,3 +515,42 @@ It offers the following features:
 OpenGL programs with character rendering services via an application 
programming
 interface (API).")
     (license (list license:expat license:lgpl2.1+))))
+
+
+(define-public python-pygame
+  (package
+    (name "python-pygame")
+    (version "1.9.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://www.pygame.org/ftp/pygame-";
+                                  version "release.tar.gz"))
+              (sha256
+               (base32
+                "0cyl0ww4fjlf289pjxa53q4klyn55ajvkgymw0qrdgp4593raq52"))))
+    (build-system python-build-system)
+    (inputs `(("libpng" ,libpng)
+              ("libjpeg" ,libjpeg)
+              ("libsmpeg" ,libsmpeg)
+              ("portmidi" ,portmidi)
+              ("sdl" ,sdl)
+              ("sdl-ttf" ,sdl-ttf)
+              ("sdl-image" ,sdl-image)
+              ("sdl-mixer" ,sdl-mixer)))
+    (home-page "http://www.pygame.org";)
+    (synopsis "Set of Python modules designed for writing games using SDL")
+    (description
+     "Pygame is a cross-platform library designed to make it easy to write
+multimedia software, such as games, in Python. Pygame requires the Python
+language and SDL multimedia library. It can also make use of several other
+popular libraries.")
+    (license (list license:bsd-2
+                   ;; python numeric license as listed by Debian looks like
+                   ;; an Expat-style license with a warranty disclaimer for
+                   ;; the U.S. government and the University of California.
+                   license:expat
+                   license:lgpl2.0+
+                   license:lgpl2.1+
+                   license:gpl3+
+                   license:psfl
+                   license:public-domain))))
-- 
2.9.1

-- 
Kei (GPG Key: 4096R/E6A5EE3C19467A0D)

Attachment: signature.asc
Description: PGP signature

Reply via email to