14
0
forked from pool/python-pygame
OBS User unknown
2007-01-15 23:34:12 +00:00
committed by Git OBS Bridge
commit 9514629c36
8 changed files with 633 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

6
README.SuSE Normal file
View File

@@ -0,0 +1,6 @@
Python pygame
=============
More documentation for pygame can be found in package python-pygame-doc, if
you want some more examples check package python-gamelets.

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6e73a0b249497661f232aacd1ee3f88cd9dfd6b6abed943b49eef35fb9b05e28
size 1153655

View File

@@ -0,0 +1,361 @@
--- src/base.c
+++ src/base.c
@@ -155,7 +155,7 @@
static PyObject* init(PyObject* self,PyObject* args)
{
PyObject *allmodules, *moduleslist, *dict, *func, *result, *mod;
- int loop, num;
+ Py_ssize_t loop, num;
int success=0, fail=0;
if(!PyArg_ParseTuple(args, ""))
@@ -215,7 +215,7 @@
{
PyObject* quit;
PyObject* privatefuncs;
- int num;
+ Py_ssize_t num;
if(!quitfunctions)
return;
@@ -414,7 +414,7 @@
static int RGBAFromObj(PyObject* obj, Uint8* RGBA)
{
- int length;
+ Py_ssize_t length;
Uint32 val;
if(PyTuple_Check(obj) && PyTuple_Size(obj)==1)
return RGBAFromObj(PyTuple_GET_ITEM(obj, 0), RGBA);
--- src/display.c
+++ src/display.c
@@ -895,7 +895,7 @@
{
PyObject* seq;
PyObject* r;
- int loop, num, count;
+ Py_ssize_t loop, num, count;
SDL_Rect* rects;
if(PyTuple_Size(arg) != 1)
return RAISE(PyExc_ValueError, "update requires a rectstyle or sequence of recstyles");
@@ -966,7 +966,7 @@
SDL_Palette* pal;
SDL_Color* colors;
PyObject* list, *item = NULL;
- int i, len;
+ Py_ssize_t i, len;
int r, g, b;
VIDEO_INIT_CHECK();
@@ -991,7 +991,7 @@
if(!PySequence_Check(list))
return RAISE(PyExc_ValueError, "Argument must be a sequence type");
- len = min(pal->ncolors, PySequence_Length(list));
+ len = min((Py_ssize_t)pal->ncolors, PySequence_Length(list));
colors = (SDL_Color*)malloc(len * sizeof(SDL_Color));
if(!colors)
--- src/draw.c
+++ src/draw.c
@@ -240,7 +240,8 @@
Uint8 rgba[4];
Uint32 color;
int closed, blend;
- int result, loop, length, drawn;
+ int result;
+ Py_ssize_t loop, length, drawn;
float startx, starty;
/*get all the arguments*/
@@ -347,7 +348,8 @@
Uint8 rgba[4];
Uint32 color;
int closed;
- int result, loop, length, drawn;
+ int result;
+ Py_ssize_t loop, length, drawn;
int startx, starty;
/*get all the arguments*/
@@ -658,7 +660,8 @@
SDL_Surface* surf;
Uint8 rgba[4];
Uint32 color;
- int width=0, length, loop, numpoints;
+ int width=0;
+ Py_ssize_t length, loop, numpoints;
int *xlist, *ylist;
int x, y, top, left, bottom, right, result;
--- src/event.c
+++ src/event.c
@@ -424,7 +424,7 @@
(unaryfunc)NULL, /*negative*/
(unaryfunc)NULL, /*pos*/
(unaryfunc)NULL, /*abs*/
- (inquiry)event_nonzero, /*nonzero*/
+ (lenfunc)event_nonzero, /*nonzero*/
(unaryfunc)NULL, /*invert*/
(binaryfunc)NULL, /*lshift*/
(binaryfunc)NULL, /*rshift*/
@@ -534,7 +534,7 @@
if(keywords)
{
PyObject *key, *value;
- int pos = 0;
+ Py_ssize_t pos = 0;
while(PyDict_Next(keywords, &pos, &key, &value))
PyDict_SetItem(dict, key, value);
}
@@ -721,7 +721,7 @@
{
SDL_Event event;
int mask = 0;
- int loop, num;
+ Py_ssize_t loop, num;
PyObject* type;
int val;
@@ -776,7 +776,7 @@
{
SDL_Event event;
int mask = 0;
- int loop, num;
+ Py_ssize_t loop, num;
PyObject* type, *list, *e;
int val;
@@ -846,7 +846,7 @@
SDL_Event event;
int result;
int mask = 0;
- int loop, num, noargs=0;
+ Py_ssize_t loop, num, noargs=0;
PyObject* type;
int val;
@@ -934,7 +934,7 @@
static PyObject* set_allowed(PyObject* self, PyObject* args)
{
- int loop, num;
+ Py_ssize_t loop, num;
PyObject* type;
int val;
@@ -978,7 +978,7 @@
static PyObject* set_blocked(PyObject* self, PyObject* args)
{
- int loop, num;
+ Py_ssize_t loop, num;
PyObject* type;
int val;
@@ -1020,7 +1020,7 @@
static PyObject* get_blocked(PyObject* self, PyObject* args)
{
- int loop, num;
+ Py_ssize_t loop, num;
PyObject* type;
int val;
int isblocked = 0;
--- src/image.c
+++ src/image.c
@@ -291,7 +291,8 @@
PyObject *surfobj, *string=NULL;
char *format, *data, *pixels;
SDL_Surface *surf, *temp=NULL;
- int w, h, color, len, flipped=0;
+ int w, h, color, flipped=0;
+ Py_ssize_t len;
int Rmask, Gmask, Bmask, Amask, Rshift, Gshift, Bshift, Ashift, Rloss, Gloss, Bloss, Aloss;
int hascolorkey, colorkey;
@@ -605,7 +606,8 @@
PyObject *string;
char *format, *data;
SDL_Surface *surf = NULL;
- int w, h, len, flipped=0;
+ int w, h, flipped=0;
+ Py_ssize_t len;
int loopw, looph;
if(!PyArg_ParseTuple(arg, "O!(ii)s|i", &PyString_Type, &string, &w, &h, &format, &flipped))
@@ -729,8 +731,9 @@
PyObject *buffer;
char *format, *data;
SDL_Surface *surf = NULL;
- int w, h, len;
- PyObject *surfobj;
+ int w, h;
+ PyObject *surfobj;
+ Py_ssize_t len;
if(!PyArg_ParseTuple(arg, "O(ii)s|i", &buffer, &w, &h, &format))
return NULL;
--- src/mouse.c
+++ src/mouse.c
@@ -202,7 +202,7 @@
int w, h, spotx, spoty;
PyObject *xormask, *andmask;
Uint8 *xordata=NULL, *anddata=NULL;
- int xorsize, andsize, loop;
+ Py_ssize_t xorsize, andsize, loop;
int val;
SDL_Cursor *lastcursor, *cursor = NULL;
--- src/rect.c
+++ src/rect.c
@@ -323,7 +323,7 @@
{
PyRectObject* self = (PyRectObject*)oself;
GAME_Rect *argrect, temp;
- int loop, size;
+ Py_ssize_t loop, size;
PyObject* list, *obj;
int t, l, b, r;
@@ -372,7 +372,7 @@
{
PyRectObject* self = (PyRectObject*)oself;
GAME_Rect *argrect, temp;
- int loop, size;
+ Py_ssize_t loop, size;
PyObject* list, *obj;
int t, l, b, r;
@@ -475,7 +475,7 @@
{
PyRectObject* self = (PyRectObject*)oself;
GAME_Rect *argrect, temp;
- int loop, size;
+ Py_ssize_t loop, size;
PyObject* list, *obj;
PyObject* ret = NULL;
@@ -525,7 +525,7 @@
{
PyRectObject* self = (PyRectObject*)oself;
GAME_Rect *argrect, temp;
- int loop, size;
+ Py_ssize_t loop, size;
PyObject* list, *obj;
PyObject* ret = NULL;
@@ -589,7 +589,7 @@
{
PyRectObject* self = (PyRectObject*)oself;
GAME_Rect *argrect, temp;
- int loop=0;
+ Py_ssize_t loop=0;
PyObject* dict, *key, *val;
PyObject* ret = NULL;
@@ -598,7 +598,7 @@
if(!PyDict_Check(dict))
return RAISE(PyExc_TypeError, "Argument must be a dict with rectstyle keys.");
- while(PyDict_Next(dict, &loop, &key, &val))
+ while(PyDict_Next(dict, &loop, &key, &val))
{
if(!(argrect = GameRect_FromObject(key, &temp)))
{
@@ -640,7 +640,7 @@
{
PyRectObject* self = (PyRectObject*)oself;
GAME_Rect *argrect, temp;
- int loop=0;
+ Py_ssize_t loop=0;
PyObject* dict, *key, *val;
PyObject* ret = NULL;
@@ -653,7 +653,7 @@
if(!ret)
return NULL;
- while(PyDict_Next(dict, &loop, &key, &val))
+ while(PyDict_Next(dict, &loop, &key, &val))
{
if(!(argrect = GameRect_FromObject(key, &temp)))
{
@@ -974,7 +974,8 @@
{
PyObject *list;
int* data = (int*)&self->r;
- int numitems, loop, l = 4;
+ Py_ssize_t numitems, loop;
+ int l = 4;
if (ihigh < 0) ihigh += l;
if (ilow < 0) ilow += l;
@@ -997,7 +998,8 @@
static int rect_ass_slice(PyRectObject *self, int ilow, int ihigh, PyObject *v)
{
int* data = (int*)&self->r;
- int numitems, loop, l = 4;
+ Py_ssize_t numitems, loop;
+ int l = 4;
int val;
if(!PySequence_Check(v))
@@ -1031,13 +1033,13 @@
}
static PySequenceMethods rect_as_sequence = {
- (inquiry)rect_length, /*length*/
+ (lenfunc)rect_length, /*length*/
(binaryfunc)NULL, /*concat*/
- (intargfunc)NULL, /*repeat*/
- (intargfunc)rect_item, /*item*/
- (intintargfunc)rect_slice, /*slice*/
- (intobjargproc)rect_ass_item, /*ass_item*/
- (intintobjargproc)rect_ass_slice, /*ass_slice*/
+ (ssizeargfunc)NULL, /*repeat*/
+ (ssizeargfunc)rect_item, /*item*/
+ (ssizessizeargfunc)rect_slice, /*slice*/
+ (ssizeobjargproc)rect_ass_item, /*ass_item*/
+ (ssizessizeobjargproc)rect_ass_slice, /*ass_slice*/
};
@@ -1094,7 +1096,7 @@
(unaryfunc)NULL, /*negative*/
(unaryfunc)NULL, /*pos*/
(unaryfunc)NULL, /*abs*/
- (inquiry)rect_nonzero, /*nonzero*/
+ (lenfunc)rect_nonzero, /*nonzero*/
(unaryfunc)NULL, /*invert*/
(binaryfunc)NULL, /*lshift*/
(binaryfunc)NULL, /*rshift*/
--- src/surface.c
+++ src/surface.c
@@ -433,7 +433,7 @@
SDL_Palette* pal = surf->format->palette;
SDL_Color* colors;
PyObject* list, *item;
- int i, len;
+ Py_ssize_t i, len;
int r, g, b;
if(!PyArg_ParseTuple(args, "O", &list))
@@ -448,7 +448,7 @@
if(!SDL_WasInit(SDL_INIT_VIDEO))
return RAISE(PyExc_SDLError, "cannot set palette without pygame.display initialized");
- len = min(pal->ncolors, PySequence_Length(list));
+ len = min((Py_ssize_t)pal->ncolors, PySequence_Length(list));
colors = (SDL_Color*)malloc(len * sizeof(SDL_Color));
if(!colors)
@@ -1353,7 +1353,7 @@
if(rect && kw)
{
PyObject *key, *value;
- int pos=0;
+ Py_ssize_t pos=0;
while(PyDict_Next(kw, &pos, &key, &value))
{
if((PyObject_SetAttr(rect, key, value) == -1))

97
python-pygame.changes Normal file
View File

@@ -0,0 +1,97 @@
-------------------------------------------------------------------
Tue Nov 21 11:32:47 CET 2006 - prusnak@suse.cz
- changes according to PEP353 (pep353.diff)
-------------------------------------------------------------------
Tue Feb 28 16:46:03 CET 2006 - jmatejek@suse.cz
- updated to reflect python changes due to #149809
-------------------------------------------------------------------
Wed Jan 25 21:40:51 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Thu Oct 6 17:38:03 CEST 2005 - matejcik@suse.cz
- update to 1.7.1release
- removed readme.html, which is no longer provided
-------------------------------------------------------------------
Wed Feb 2 14:40:49 CET 2005 - ro@suse.de
- fix build
-------------------------------------------------------------------
Tue Sep 21 18:22:53 CEST 2004 - mcihar@suse.cz
- update to 1.6.2, this (among others) fixes brokeness on x86_64 - bug #45731
-------------------------------------------------------------------
Fri Jan 30 16:28:25 CET 2004 - mcihar@suse.cz
- fixed documentation installation
-------------------------------------------------------------------
Fri Oct 24 12:35:55 CEST 2003 - mcihar@suse.cz
- update to 1.6 (This new release mainly contains stability and internal
fixes, small fixes for line and circle primitives, many fixes for locating
system TrueType fonts, an updated Mac OS X environment, and bigger integer
storage for Rect objects.)
- patch was included in upstream
- no root for build
-------------------------------------------------------------------
Thu Oct 02 11:54:20 CEST 2003 - mcihar@suse.cz
- fixed mode related functions that failed on AMD64, thanks to gpayer@suse.de (bug #31709)
-------------------------------------------------------------------
Mon Jun 16 12:51:28 CEST 2003 - mcihar@suse.cz
- use record-rpm
- updated to 1.5.6
-------------------------------------------------------------------
Mon May 12 14:22:17 CEST 2003 - mcihar@suse.cz
- use versioned dependency on python
-------------------------------------------------------------------
Wed Jan 08 11:42:06 CET 2003 - mcihar@suse.cz
- added obsoletes and provides for rename
- moved doc into %{_defaultdocdir}/python-pygame
- some doc is in base package with info where to find more
-------------------------------------------------------------------
Mon Jan 06 12:16:46 CET 2003 - mcihar@suse.cz
- update to 1.5.5
* improved Unicode support
* fixed some bugs
- renamed to python-pygame
-------------------------------------------------------------------
Mon Aug 12 11:26:17 CEST 2002 - ro@suse.de
- update to 1.5 to get rid of conflict with pause() from unistd
-------------------------------------------------------------------
Mon Feb 18 15:56:57 CET 2002 - vinil@suse.cz
- pygame now requires python
-------------------------------------------------------------------
Mon Feb 4 15:31:30 CET 2002 - nadvornik@suse.cz
- update to 1.4
-------------------------------------------------------------------
Tue Jan 29 14:36:49 CET 2002 - nadvornik@suse.cz
- new package, version 1.3

142
python-pygame.spec Normal file
View File

@@ -0,0 +1,142 @@
#
# spec file for package python-pygame (Version 1.7.1release)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: python-pygame
BuildRequires: SDL_image-devel SDL_mixer-devel SDL_ttf python-devel python-numeric xorg-x11
Version: 1.7.1release
Release: 40
Source: pygame-%{version}.tar.bz2
Source1: README.SuSE
Patch0: %{name}-%{version}-pep353.diff
Summary: A Python Module for Interfacing with the SDL Multimedia Library
License: GNU Library General Public License v. 2.0 and 2.1 (LGPL)
Group: Development/Libraries/Python
URL: http://www.pygame.org/
Provides: pygame
Obsoletes: pygame
Autoreqprov: on
%{py_requires}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Pygame is a Python wrapper module for the SDL multimedia library. It
contains Python functions and classes that allow you to use SDL's
support for playing CD-ROMs, audio and video output, and keyboard,
mouse and joystick input. Pygame also includes support for the
Numerical Python extension. Pygame is the successor to the pySDL
wrapper project, written by Mark Baker.
Authors:
--------
Pete Shinners <pete@shinners.org>
%package doc
Summary: pygame documentation and example programs
Group: Development/Libraries/Python
Provides: pygame-doc
Obsoletes: pygame-doc
Requires: python-pygame = %version-%release
%description doc
pygame is a Python wrapper module for the SDL multimedia library. It
contains python functions and classes that will allow you to use SDL's
support for playing cdroms, audio and video output, and keyboard, mouse
and joystick input. pygame also includes support for the Numerical
Python extension. pygame is the successor to the pySDL wrapper project,
written by Mark Baker.
Authors:
--------
Pete Shinners <pete@shinners.org>
%prep
%setup -n pygame-%{version}
%patch0
%build
export CFLAGS="$RPM_OPT_FLAGS -Wall"
yes "y" | python -d config.py
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES
#install doc
install -d $RPM_BUILD_ROOT%{_docdir}/python-pygame
install -m 644 WHATSNEW readme.txt %{S:1} $RPM_BUILD_ROOT%{_docdir}/python-pygame
cp -r docs/ examples/ $RPM_BUILD_ROOT%{_docdir}/python-pygame
%clean
rm -rf $RPM_BUILD_ROOT
%files -f INSTALLED_FILES
%defattr(644, root, root, 755)
%doc %dir %{_docdir}/python-pygame
%doc %{_docdir}/python-pygame/WHATSNEW
%doc %{_docdir}/python-pygame/readme.txt
%doc %{_docdir}/python-pygame/README.SuSE
%files doc
%defattr(644, root, root, 755)
%doc %{_docdir}/python-pygame/docs
%doc %{_docdir}/python-pygame/examples
%changelog -n python-pygame
* Tue Nov 21 2006 - prusnak@suse.cz
- changes according to PEP353 (pep353.diff)
* Tue Feb 28 2006 - jmatejek@suse.cz
- updated to reflect python changes due to #149809
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Oct 06 2005 - matejcik@suse.cz
- update to 1.7.1release
- removed readme.html, which is no longer provided
* Wed Feb 02 2005 - ro@suse.de
- fix build
* Tue Sep 21 2004 - mcihar@suse.cz
- update to 1.6.2, this (among others) fixes brokeness on x86_64 - bug #45731
* Fri Jan 30 2004 - mcihar@suse.cz
- fixed documentation installation
* Fri Oct 24 2003 - mcihar@suse.cz
- update to 1.6 (This new release mainly contains stability and internal
fixes, small fixes for line and circle primitives, many fixes for locating
system TrueType fonts, an updated Mac OS X environment, and bigger integer
storage for Rect objects.)
- patch was included in upstream
- no root for build
* Thu Oct 02 2003 - mcihar@suse.cz
- fixed mode related functions that failed on AMD64, thanks to gpayer@suse.de (bug #31709)
* Mon Jun 16 2003 - mcihar@suse.cz
- use record-rpm
- updated to 1.5.6
* Mon May 12 2003 - mcihar@suse.cz
- use versioned dependency on python
* Wed Jan 08 2003 - mcihar@suse.cz
- added obsoletes and provides for rename
- moved doc into %%{_defaultdocdir}/python-pygame
- some doc is in base package with info where to find more
* Mon Jan 06 2003 - mcihar@suse.cz
- update to 1.5.5
* improved Unicode support
* fixed some bugs
- renamed to python-pygame
* Mon Aug 12 2002 - ro@suse.de
- update to 1.5 to get rid of conflict with pause() from unistd
* Mon Feb 18 2002 - vinil@suse.cz
- pygame now requires python
* Mon Feb 04 2002 - nadvornik@suse.cz
- update to 1.4
* Tue Jan 29 2002 - nadvornik@suse.cz
- new package, version 1.3

0
ready Normal file
View File