diff mbox

[v3,6/9] python-pygame: bump version to fix Python 3 byte-compilation issue

Message ID 1462133720-409-7-git-send-email-thomas.petazzoni@free-electrons.com
State Accepted
Headers show

Commit Message

Thomas Petazzoni May 1, 2016, 8:15 p.m. UTC
The current version of python-pygame in Buildroot does not
byte-compile properly with Python 3. Commit 22efec0b44da from upstream
fixes the problem, so we take this opportunity to bump the pygame
version.

Fixing byte-compilation is necessary as we will soon enable a
mechanism that aborts the build in case of error during the
byte-compilation process (while they are today considered as
warnings).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/python-pygame/python-pygame.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Samuel Martin May 1, 2016, 9:22 p.m. UTC | #1
Thomas, all,

On Sun, May 1, 2016 at 10:15 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> The current version of python-pygame in Buildroot does not
> byte-compile properly with Python 3. Commit 22efec0b44da from upstream
> fixes the problem, so we take this opportunity to bump the pygame
> version.
>
> Fixing byte-compilation is necessary as we will soon enable a
> mechanism that aborts the build in case of error during the
> byte-compilation process (while they are today considered as
> warnings).
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>

> ---
>  package/python-pygame/python-pygame.mk | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/package/python-pygame/python-pygame.mk b/package/python-pygame/python-pygame.mk
> index 995f80a..1ef2bdf 100644
> --- a/package/python-pygame/python-pygame.mk
> +++ b/package/python-pygame/python-pygame.mk
> @@ -6,7 +6,7 @@
>
>  # stable 1.9.1 release requires V4L which has been wiped out of recent Linux
>  # kernels, so use latest mercurial revision until next stable release is out.
> -PYTHON_PYGAME_VERSION = f0bb4a4b365d
> +PYTHON_PYGAME_VERSION = d61ea8eabd56
>  PYTHON_PYGAME_SOURCE = pygame-$(PYTHON_PYGAME_VERSION).tar.gz
>  PYTHON_PYGAME_SITE = https://bitbucket.org/pygame/pygame
>  PYTHON_PYGAME_SITE_METHOD = hg
> @@ -66,6 +66,10 @@ define PYTHON_PYGAME_UNCONFIGURE_SCRAP
>  endef
>  endif
>
> +define PYTHON_PYGAME_UNCONFIGURE_FREETYPE
> +       $(SED) 's/^_freetype/#_freetype/' $(@D)/Setup
> +endef
Note that in version f0bb4a4b365d, _freetype stuff was already there
but disable.
(see https://bitbucket.org/pygame/pygame/commits/0a3be7313aa4)

> +
>  PYTHON_PYGAME_SDL_FLAGS = `$(STAGING_DIR)/usr/bin/sdl-config --cflags`
>  PYTHON_PYGAME_SDL_FLAGS += `$(STAGING_DIR)/usr/bin/sdl-config --libs`
>
> @@ -82,6 +86,7 @@ define PYTHON_PYGAME_CONFIGURE_CMDS
>         $(PYTHON_PYGAME_UNCONFIGURE_SURFARRAY)
>         $(PYTHON_PYGAME_UNCONFIGURE_MOVIE)
>         $(PYTHON_PYGAME_UNCONFIGURE_SCRAP)
> +       $(PYTHON_PYGAME_UNCONFIGURE_FREETYPE)
>  endef
>
>  define PYTHON_PYGAME_REMOVE_DOC
> --
> 2.7.4
>

Regards,
Thomas Petazzoni May 1, 2016, 9:49 p.m. UTC | #2
Hello,

On Sun, 1 May 2016 23:22:27 +0200, Samuel Martin wrote:

> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>  
> Reviewed-by: Samuel Martin <s.martin49@gmail.com>

Thanks!


> > +define PYTHON_PYGAME_UNCONFIGURE_FREETYPE
> > +       $(SED) 's/^_freetype/#_freetype/' $(@D)/Setup
> > +endef  
> Note that in version f0bb4a4b365d, _freetype stuff was already there
> but disable.
> (see https://bitbucket.org/pygame/pygame/commits/0a3be7313aa4)

Ah, I didn't notice that. Which reminds me I should explain in the
commit log why I'm adding this.

Thanks for the review,

Thomas
Thomas Petazzoni May 17, 2016, 8:51 p.m. UTC | #3
Hello,

On Sun,  1 May 2016 22:15:17 +0200, Thomas Petazzoni wrote:
> The current version of python-pygame in Buildroot does not
> byte-compile properly with Python 3. Commit 22efec0b44da from upstream
> fixes the problem, so we take this opportunity to bump the pygame
> version.
> 
> Fixing byte-compilation is necessary as we will soon enable a
> mechanism that aborts the build in case of error during the
> byte-compilation process (while they are today considered as
> warnings).
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  package/python-pygame/python-pygame.mk | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

I've amended the commit log to indicate why we're disabling the
freetype support, and I've applied to next. Thanks!

Thomas
diff mbox

Patch

diff --git a/package/python-pygame/python-pygame.mk b/package/python-pygame/python-pygame.mk
index 995f80a..1ef2bdf 100644
--- a/package/python-pygame/python-pygame.mk
+++ b/package/python-pygame/python-pygame.mk
@@ -6,7 +6,7 @@ 
 
 # stable 1.9.1 release requires V4L which has been wiped out of recent Linux
 # kernels, so use latest mercurial revision until next stable release is out.
-PYTHON_PYGAME_VERSION = f0bb4a4b365d
+PYTHON_PYGAME_VERSION = d61ea8eabd56
 PYTHON_PYGAME_SOURCE = pygame-$(PYTHON_PYGAME_VERSION).tar.gz
 PYTHON_PYGAME_SITE = https://bitbucket.org/pygame/pygame
 PYTHON_PYGAME_SITE_METHOD = hg
@@ -66,6 +66,10 @@  define PYTHON_PYGAME_UNCONFIGURE_SCRAP
 endef
 endif
 
+define PYTHON_PYGAME_UNCONFIGURE_FREETYPE
+	$(SED) 's/^_freetype/#_freetype/' $(@D)/Setup
+endef
+
 PYTHON_PYGAME_SDL_FLAGS = `$(STAGING_DIR)/usr/bin/sdl-config --cflags`
 PYTHON_PYGAME_SDL_FLAGS += `$(STAGING_DIR)/usr/bin/sdl-config --libs`
 
@@ -82,6 +86,7 @@  define PYTHON_PYGAME_CONFIGURE_CMDS
 	$(PYTHON_PYGAME_UNCONFIGURE_SURFARRAY)
 	$(PYTHON_PYGAME_UNCONFIGURE_MOVIE)
 	$(PYTHON_PYGAME_UNCONFIGURE_SCRAP)
+	$(PYTHON_PYGAME_UNCONFIGURE_FREETYPE)
 endef
 
 define PYTHON_PYGAME_REMOVE_DOC