Skip to contentSkip to conversation

Add pygame package

PATCH Superseded julien.boibessot at free.fr 2 participants 5 messages Jan 11, 2012

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Add pygame package

From: Julien Boibessot <[email protected]>

---
Changes since v2:
As requested by Peter Korsgaard:
- autoselect sdl_* libs instead of depending of them
- removed movie/sndarray/surfarray config check (will be re-added when smpeg/numpy are integrated in BR)
- remove doc only if !BR2_HAVE_DOCUMENTATION
Other:
- renamed PYTHON_PYGAME_CONFIGURE_* in PYTHON_PYGAME_UNCONFIGURE_* to better understand that we remove modules from default build config if dependancies are not available

Changes since v1:
- moved pygame to package/python-pygame and to "external python modules" menu as requested by Yegor Yefremov

 package/Config.in                      |    1 +
 package/python-pygame/Config.in        |   51 +++++++++++++++
 package/python-pygame/python-pygame.mk |  106 ++++++++++++++++++++++++++++++++
 3 files changed, 158 insertions(+), 0 deletions(-)
 create mode 100644 package/python-pygame/Config.in
 create mode 100644 package/python-pygame/python-pygame.mk
package/Config.in +1 -0
index a82c658..c45cf56 100644
@@ -242,6 +242,7 @@ menu "external python modules"
 source "package/python-dpkt/Config.in"
 source "package/python-mad/Config.in"
 source "package/python-netifaces/Config.in"
+source "package/python-pygame/Config.in"
 source "package/python-serial/Config.in"
 source "package/python-setuptools/Config.in"
 endmenu
package/python-pygame/Config.in new file +51 -0

51 lines not on this page · raw message

package/python-pygame/python-pygame.mk new file +106 -0

106 lines not on this page · raw message

Signature · 1 line
1.7.5.4
#1 lore raw

PATCH v3 1/1 Add pygame package

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"julien" == julien boibessot <[email protected]> writes:

julien> From: Julien Boibessot <[email protected]> julien> Signed-off-by: Julien Boibessot <[email protected]> julien> ---

 julien>  Changes since v2:
 julien>  As requested by Peter Korsgaard:
 julien>  - autoselect sdl_* libs instead of depending of them
 julien>  - removed movie/sndarray/surfarray config check (will be re-added when
 julien>    smpeg/numpy are integrated in BR)
 julien>  - remove doc only if !BR2_HAVE_DOCUMENTATION
 julien>  Other:
 julien>  - renamed PYTHON_PYGAME_CONFIGURE_* in PYTHON_PYGAME_UNCONFIGURE_* to better

julien> understand that we remove modules from default build config if dependancies
julien> are not available

Thanks, looks good. Unfortunately it doesn't work:

building 'pygame.gfxdraw' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/SDL_gfx
/home/peko/source/buildroot/output/host/usr/bin/arm-linux-gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -pipe -Os -fPIC -D_GNU_SOURCE= -D_REENTRANT -I/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/SDL -I/home/peko/source/buildroot/output/host/usr/include/python2.7 -c src/gfxdraw.c -o build/temp.linux-x86_64-2.7/src/gfxdraw.o In file included from /home/peko/source/buildroot/output/host/usr/include/python2.7/Python.h:8,

                 from src/pygame.h:80,
                 from src/gfxdraw.c:33:
/home/peko/source/buildroot/output/host/usr/include/python2.7/pyconfig.h:1136:1: warning: "_GNU_SOURCE" redefined
<command-line>: warning: this is the location of the previous definition
In file included from /home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/limits.h:27,
                 from /opt/br/arm926t-wchar/usr/lib/gcc/arm-unknown-linux-uclibcgnueabi/4.3.6/include-fixed/limits.h:122,
                 from /opt/br/arm926t-wchar/usr/lib/gcc/arm-unknown-linux-uclibcgnueabi/4.3.6/include-fixed/syslimits.h:7,
                 from /opt/br/arm926t-wchar/usr/lib/gcc/arm-unknown-linux-uclibcgnueabi/4.3.6/include-fixed/limits.h:11,
                 from /home/peko/source/buildroot/output/host/usr/include/python2.7/Python.h:19,
                 from src/pygame.h:80,
                 from src/gfxdraw.c:33:

/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/features.h:219:5:
error: #error It appears you have defined
_FILE_OFFSET_BITS=64. Unfortunately, uClibc was built without large file
support enabled.

Notice how it is looking at my host-python rather than target-python (where I don't have largefile support) includes.

Any idea?

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH v3 1/1 Add pygame package

Quoted 24 lines · Peter Korsgaard

Thanks, looks good. Unfortunately it doesn't work:

building 'pygame.gfxdraw' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/SDL_gfx
/home/peko/source/buildroot/output/host/usr/bin/arm-linux-gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -pipe -Os -fPIC -D_GNU_SOURCE= -D_REENTRANT -I/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/SDL -I/home/peko/source/buildroot/output/host/usr/include/python2.7 -c src/gfxdraw.c -o build/temp.linux-x86_64-2.7/src/gfxdraw.o In file included from /home/peko/source/buildroot/output/host/usr/include/python2.7/Python.h:8,

                  from src/pygame.h:80,
                  from src/gfxdraw.c:33:
/home/peko/source/buildroot/output/host/usr/include/python2.7/pyconfig.h:1136:1: warning: "_GNU_SOURCE" redefined
<command-line>: warning: this is the location of the previous definition
In file included from /home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/limits.h:27,
                  from /opt/br/arm926t-wchar/usr/lib/gcc/arm-unknown-linux-uclibcgnueabi/4.3.6/include-fixed/limits.h:122,
                  from /opt/br/arm926t-wchar/usr/lib/gcc/arm-unknown-linux-uclibcgnueabi/4.3.6/include-fixed/syslimits.h:7,
                  from /opt/br/arm926t-wchar/usr/lib/gcc/arm-unknown-linux-uclibcgnueabi/4.3.6/include-fixed/limits.h:11,
                  from /home/peko/source/buildroot/output/host/usr/include/python2.7/Python.h:19,
                  from src/pygame.h:80,
                  from src/gfxdraw.c:33:

/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/features.h:219:5:
error: #error It appears you have defined
_FILE_OFFSET_BITS=64. Unfortunately, uClibc was built without large file
support enabled.

Quoted 4 lines

Notice how it is looking at my host-python rather than target-python (where I don't have largefile support) includes.

Any idea?

Oups. I missed that one because error seems to occur only when the Host is a 64bits architecture (I have a 32 bits Host).
Seems like a problem in distutils that adds "-I/home/peko/source/buildroot/output/host/usr/include/python2.7" when compiling, which isn't a problem when Host and Target python installations match.

You have the same problem (include added) in python-mad package. Does it compile on your Host ?

Trying to find a solution...

Regards,
Julien

#3 lore raw

PATCH v3 1/1 Add pygame package

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Julien" == Julien Boibessot <[email protected]> writes:

Hi,

Quoted 1 line
Quoted 1 line

Any idea?

Julien> Oups. I missed that one because error seems to occur only when the Julien> Host is a 64bits architecture (I have a 32 bits Host). Julien> Seems like a problem in distutils that adds
Julien> "-I/home/peko/source/buildroot/output/host/usr/include/python2.7" when Julien> compiling, which isn't a problem when Host and Target python Julien> installations match.

Julien> You have the same problem (include added) in python-mad package. Does Julien> it compile on your Host ?

It does compile here. Presumably because of the --include-dirs, even though it ends up adding both an -I for host-python and target-python (but target is first, so used) which isn't really nice:

building 'madmodule' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
/home/peko/source/buildroot/output/host/usr/bin/arm-linux-gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -pipe -Os -fPIC -DVERSION_MAJOR=0 -DVERSION_MINOR=6 -DVERSION="0.6" -I/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include -I/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/python2.7 -I/home/peko/source/buildroot/output/host/usr/include/python2.7 -c src/madmodule.c -o build/temp.linux-x86_64-2.7/src/madmodule.o

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH v3 1/1 Add pygame package

Quoted 7 lines · Peter Korsgaard

Julien> You have the same problem (include added) in python-mad package. Does Julien> it compile on your Host ?

It does compile here. Presumably because of the --include-dirs, even though it ends up adding both an -I for host-python and target-python (but target is first, so used) which isn't really nice:

Quoted 6 lines

building 'madmodule' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
/home/peko/source/buildroot/output/host/usr/bin/arm-linux-gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -pipe -Os -fPIC -DVERSION_MAJOR=0 -DVERSION_MINOR=6 -DVERSION="0.6" -I/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include -I/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/python2.7 -I/home/peko/source/buildroot/output/host/usr/include/python2.7 -c src/madmodule.c -o build/temp.linux-x86_64-2.7/src/madmodule.o

can you try my v4 patch version please ? I used Thomas distutils cross-compilation modifications to prevent Host include usage.

Regards,
Julien