From ae56485745204a64e2f64335e4a06a38ce5044c3 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:19:42 +0000 Subject: [PATCH 1/8] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 59b840a..436fca0 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: wxPython -# $Id: Makefile,v 1.2 2004/11/24 05:07:05 gafton Exp $ +# $Id: Makefile,v 1.4 2005/12/21 13:19:54 mschwendt Exp $ NAME := wxPython SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From d8c8e27978d57b174d8c8ee91e1fe7c80a78ca6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Sat, 16 Jan 2010 17:03:24 +0000 Subject: [PATCH 2/8] - update to 2.8.10.1 - backport to wxGTK 2.8.10 API - cleaned up BRs --- .cvsignore | 2 +- sources | 2 +- wxPython-2.8.10-backport.patch | 390 +++++++++++++++++++++++++++++++++ wxPython.spec | 33 +-- 4 files changed, 412 insertions(+), 15 deletions(-) create mode 100644 wxPython-2.8.10-backport.patch diff --git a/.cvsignore b/.cvsignore index b89a8f8..5017d43 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -wxPython-src-2.8.9.2.tar.bz2 +wxPython-src-2.8.10.1.tar.bz2 diff --git a/sources b/sources index 3cd943c..53956ee 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e3d89746af98b9279e4ff39a57f6dc63 wxPython-src-2.8.9.2.tar.bz2 +65d5ef166f23fe8b4c67f58df164f93e wxPython-src-2.8.10.1.tar.bz2 diff --git a/wxPython-2.8.10-backport.patch b/wxPython-2.8.10-backport.patch new file mode 100644 index 0000000..0639913 --- /dev/null +++ b/wxPython-2.8.10-backport.patch @@ -0,0 +1,390 @@ +diff -Nrup wxPython-src-2.8.10.1.orig/wxPython/src/gtk/_core.py wxPython-src-2.8.10.1/wxPython/src/gtk/_core.py +--- wxPython-src-2.8.10.1.orig/wxPython/src/gtk/_core.py 2009-05-12 23:24:20.000000000 +0200 ++++ wxPython-src-2.8.10.1/wxPython/src/gtk/_core.py 2010-01-16 10:52:45.000000000 +0100 +@@ -6034,10 +6034,6 @@ class ShowEvent(Event): + """GetShow(self) -> bool""" + return _core_.ShowEvent_GetShow(*args, **kwargs) + +- def IsShown(*args, **kwargs): +- """IsShown(self) -> bool""" +- return _core_.ShowEvent_IsShown(*args, **kwargs) +- + Show = property(GetShow,SetShow,doc="See `GetShow` and `SetShow`") + _core_.ShowEvent_swigregister(ShowEvent) + +diff -Nrup wxPython-src-2.8.10.1.orig/wxPython/src/gtk/_core_wrap.cpp wxPython-src-2.8.10.1/wxPython/src/gtk/_core_wrap.cpp +--- wxPython-src-2.8.10.1.orig/wxPython/src/gtk/_core_wrap.cpp 2009-05-12 23:24:20.000000000 +0200 ++++ wxPython-src-2.8.10.1/wxPython/src/gtk/_core_wrap.cpp 2010-01-16 10:53:50.000000000 +0100 +@@ -28673,36 +28673,6 @@ fail: + } + + +-SWIGINTERN PyObject *_wrap_ShowEvent_IsShown(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- wxShowEvent *arg1 = (wxShowEvent *) 0 ; +- bool result; +- void *argp1 = 0 ; +- int res1 = 0 ; +- PyObject *swig_obj[1] ; +- +- if (!args) SWIG_fail; +- swig_obj[0] = args; +- res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxShowEvent, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShowEvent_IsShown" "', expected argument " "1"" of type '" "wxShowEvent const *""'"); +- } +- arg1 = reinterpret_cast< wxShowEvent * >(argp1); +- { +- PyThreadState* __tstate = wxPyBeginAllowThreads(); +- result = (bool)((wxShowEvent const *)arg1)->IsShown(); +- wxPyEndAllowThreads(__tstate); +- if (PyErr_Occurred()) SWIG_fail; +- } +- { +- resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); +- } +- return resultobj; +-fail: +- return NULL; +-} +- +- + SWIGINTERN PyObject *ShowEvent_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; +@@ -61296,7 +61266,6 @@ static PyMethodDef SwigMethods[] = { + { (char *)"new_ShowEvent", (PyCFunction) _wrap_new_ShowEvent, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"ShowEvent_SetShow", (PyCFunction) _wrap_ShowEvent_SetShow, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"ShowEvent_GetShow", (PyCFunction)_wrap_ShowEvent_GetShow, METH_O, NULL}, +- { (char *)"ShowEvent_IsShown", (PyCFunction)_wrap_ShowEvent_IsShown, METH_O, NULL}, + { (char *)"ShowEvent_swigregister", ShowEvent_swigregister, METH_VARARGS, NULL}, + { (char *)"ShowEvent_swiginit", ShowEvent_swiginit, METH_VARARGS, NULL}, + { (char *)"new_IconizeEvent", (PyCFunction) _wrap_new_IconizeEvent, METH_VARARGS | METH_KEYWORDS, NULL}, +diff -Nrup wxPython-src-2.8.10.1.orig/wxPython/src/gtk/_gdi.py wxPython-src-2.8.10.1/wxPython/src/gtk/_gdi.py +--- wxPython-src-2.8.10.1.orig/wxPython/src/gtk/_gdi.py 2009-05-12 23:24:20.000000000 +0200 ++++ wxPython-src-2.8.10.1/wxPython/src/gtk/_gdi.py 2010-01-16 10:54:38.000000000 +0100 +@@ -3538,10 +3538,6 @@ class DC(_core.Object): + """ + return _gdi_.DC_SetClippingRect(*args, **kwargs) + +- def SetDeviceClippingRegion(*args, **kwargs): +- """SetDeviceClippingRegion(self, Region region)""" +- return _gdi_.DC_SetDeviceClippingRegion(*args, **kwargs) +- + def DrawLines(*args, **kwargs): + """ + DrawLines(self, List points, int xoffset=0, int yoffset=0) +@@ -5962,11 +5958,6 @@ class GraphicsRenderer(_core.Object): + return _gdi_.GraphicsRenderer_GetDefaultRenderer(*args, **kwargs) + + GetDefaultRenderer = staticmethod(GetDefaultRenderer) +- def GetCairoRenderer(*args, **kwargs): +- """GetCairoRenderer() -> GraphicsRenderer""" +- return _gdi_.GraphicsRenderer_GetCairoRenderer(*args, **kwargs) +- +- GetCairoRenderer = staticmethod(GetCairoRenderer) + def CreateContext(*args): + """ + CreateContext(self, WindowDC dc) -> GraphicsContext +diff -Nrup wxPython-src-2.8.10.1.orig/wxPython/src/gtk/_gdi_wrap.cpp wxPython-src-2.8.10.1/wxPython/src/gtk/_gdi_wrap.cpp +--- wxPython-src-2.8.10.1.orig/wxPython/src/gtk/_gdi_wrap.cpp 2009-05-12 23:24:20.000000000 +0200 ++++ wxPython-src-2.8.10.1/wxPython/src/gtk/_gdi_wrap.cpp 2010-01-16 11:00:47.000000000 +0100 +@@ -4171,12 +4171,6 @@ public : + "wx.GraphicsRenderer is not available on this platform."); + return NULL; + } +- static wxGraphicsRenderer* GetCairoRenderer() { +- PyErr_SetString(PyExc_NotImplementedError, +- "wx.GraphicsRenderer is not available on this platform."); +- return NULL; +- } +- + virtual wxGraphicsContext * CreateContext( const wxWindowDC& ) { return NULL; } + virtual wxGraphicsContext * CreateContextFromNativeContext( void * ) { return NULL; } + virtual wxGraphicsContext * CreateContextFromNativeWindow( void * ) { return NULL; } +@@ -20579,47 +20573,6 @@ fail: + } + + +-SWIGINTERN PyObject *_wrap_DC_SetDeviceClippingRegion(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { +- PyObject *resultobj = 0; +- wxDC *arg1 = (wxDC *) 0 ; +- wxRegion *arg2 = 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; +- void *argp2 = 0 ; +- int res2 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- char * kwnames[] = { +- (char *) "self",(char *) "region", NULL +- }; +- +- if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:DC_SetDeviceClippingRegion",kwnames,&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxDC, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DC_SetDeviceClippingRegion" "', expected argument " "1"" of type '" "wxDC *""'"); +- } +- arg1 = reinterpret_cast< wxDC * >(argp1); +- res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_wxRegion, 0 | 0); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DC_SetDeviceClippingRegion" "', expected argument " "2"" of type '" "wxRegion const &""'"); +- } +- if (!argp2) { +- SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DC_SetDeviceClippingRegion" "', expected argument " "2"" of type '" "wxRegion const &""'"); +- } +- arg2 = reinterpret_cast< wxRegion * >(argp2); +- { +- PyThreadState* __tstate = wxPyBeginAllowThreads(); +- (arg1)->SetDeviceClippingRegion((wxRegion const &)*arg2); +- wxPyEndAllowThreads(__tstate); +- if (PyErr_Occurred()) SWIG_fail; +- } +- resultobj = SWIG_Py_Void(); +- return resultobj; +-fail: +- return NULL; +-} +- +- + SWIGINTERN PyObject *_wrap_DC_DrawLines(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxDC *arg1 = (wxDC *) 0 ; +@@ -30753,22 +30706,6 @@ fail: + } + + +-SWIGINTERN PyObject *_wrap_GraphicsRenderer_GetCairoRenderer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- wxGraphicsRenderer *result = 0 ; +- +- if (!SWIG_Python_UnpackTuple(args,"GraphicsRenderer_GetCairoRenderer",0,0,0)) SWIG_fail; +- { +- result = (wxGraphicsRenderer *)wxGraphicsRenderer::GetCairoRenderer(); +- if (PyErr_Occurred()) SWIG_fail; +- } +- resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxGraphicsRenderer, 0 | 0 ); +- return resultobj; +-fail: +- return NULL; +-} +- +- + SWIGINTERN PyObject *_wrap_GraphicsRenderer_CreateContext__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + wxGraphicsRenderer *arg1 = (wxGraphicsRenderer *) 0 ; +@@ -40069,7 +40006,6 @@ static PyMethodDef SwigMethods[] = { + { (char *)"DC_SetClippingRegionPointSize", (PyCFunction) _wrap_DC_SetClippingRegionPointSize, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_SetClippingRegionAsRegion", (PyCFunction) _wrap_DC_SetClippingRegionAsRegion, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_SetClippingRect", (PyCFunction) _wrap_DC_SetClippingRect, METH_VARARGS | METH_KEYWORDS, NULL}, +- { (char *)"DC_SetDeviceClippingRegion", (PyCFunction) _wrap_DC_SetDeviceClippingRegion, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_DrawLines", (PyCFunction) _wrap_DC_DrawLines, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_DrawPolygon", (PyCFunction) _wrap_DC_DrawPolygon, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"DC_DrawLabel", (PyCFunction) _wrap_DC_DrawLabel, METH_VARARGS | METH_KEYWORDS, NULL}, +@@ -40341,7 +40277,6 @@ static PyMethodDef SwigMethods[] = { + { (char *)"GraphicsContext_swigregister", GraphicsContext_swigregister, METH_VARARGS, NULL}, + { (char *)"delete_GraphicsRenderer", (PyCFunction)_wrap_delete_GraphicsRenderer, METH_O, NULL}, + { (char *)"GraphicsRenderer_GetDefaultRenderer", (PyCFunction)_wrap_GraphicsRenderer_GetDefaultRenderer, METH_NOARGS, NULL}, +- { (char *)"GraphicsRenderer_GetCairoRenderer", (PyCFunction)_wrap_GraphicsRenderer_GetCairoRenderer, METH_NOARGS, NULL}, + { (char *)"GraphicsRenderer_CreateContext", _wrap_GraphicsRenderer_CreateContext, METH_VARARGS, NULL}, + { (char *)"GraphicsRenderer_CreateMeasuringContext", (PyCFunction)_wrap_GraphicsRenderer_CreateMeasuringContext, METH_O, NULL}, + { (char *)"GraphicsRenderer_CreateContextFromNativeContext", (PyCFunction) _wrap_GraphicsRenderer_CreateContextFromNativeContext, METH_VARARGS | METH_KEYWORDS, NULL}, +diff -Nrup wxPython-src-2.8.10.1.orig/wxPython/src/gtk/xrc.py wxPython-src-2.8.10.1/wxPython/src/gtk/xrc.py +--- wxPython-src-2.8.10.1.orig/wxPython/src/gtk/xrc.py 2009-05-12 23:24:20.000000000 +0200 ++++ wxPython-src-2.8.10.1/wxPython/src/gtk/xrc.py 2010-01-16 11:02:40.000000000 +0100 +@@ -441,18 +441,6 @@ class XmlNode(object): + """SetProperties(self, XmlProperty prop)""" + return _xrc.XmlNode_SetProperties(*args, **kwargs) + +- def GetAttribute(*args, **kwargs): +- """GetAttribute(self, String attrName, String defaultVal) -> String""" +- return _xrc.XmlNode_GetAttribute(*args, **kwargs) +- +- def AddAttribute(*args, **kwargs): +- """AddAttribute(self, String attrName, String value)""" +- return _xrc.XmlNode_AddAttribute(*args, **kwargs) +- +- def GetAttributes(*args, **kwargs): +- """GetAttributes(self) -> XmlProperty""" +- return _xrc.XmlNode_GetAttributes(*args, **kwargs) +- + Children = property(GetChildren,SetChildren,doc="See `GetChildren` and `SetChildren`") + Content = property(GetContent,SetContent,doc="See `GetContent` and `SetContent`") + Name = property(GetName,SetName,doc="See `GetName` and `SetName`") +diff -Nrup wxPython-src-2.8.10.1.orig/wxPython/src/gtk/xrc_wrap.cpp wxPython-src-2.8.10.1/wxPython/src/gtk/xrc_wrap.cpp +--- wxPython-src-2.8.10.1.orig/wxPython/src/gtk/xrc_wrap.cpp 2009-05-12 23:24:20.000000000 +0200 ++++ wxPython-src-2.8.10.1/wxPython/src/gtk/xrc_wrap.cpp 2010-01-16 11:03:14.000000000 +0100 +@@ -6361,163 +6361,6 @@ fail: + } + + +-SWIGINTERN PyObject *_wrap_XmlNode_GetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { +- PyObject *resultobj = 0; +- wxXmlNode *arg1 = (wxXmlNode *) 0 ; +- wxString *arg2 = 0 ; +- wxString *arg3 = 0 ; +- wxString result; +- void *argp1 = 0 ; +- int res1 = 0 ; +- bool temp2 = false ; +- bool temp3 = false ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- PyObject * obj2 = 0 ; +- char * kwnames[] = { +- (char *) "self",(char *) "attrName",(char *) "defaultVal", NULL +- }; +- +- if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:XmlNode_GetAttribute",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxXmlNode, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmlNode_GetAttribute" "', expected argument " "1"" of type '" "wxXmlNode const *""'"); +- } +- arg1 = reinterpret_cast< wxXmlNode * >(argp1); +- { +- arg2 = wxString_in_helper(obj1); +- if (arg2 == NULL) SWIG_fail; +- temp2 = true; +- } +- { +- arg3 = wxString_in_helper(obj2); +- if (arg3 == NULL) SWIG_fail; +- temp3 = true; +- } +- { +- PyThreadState* __tstate = wxPyBeginAllowThreads(); +- result = ((wxXmlNode const *)arg1)->GetAttribute((wxString const &)*arg2,(wxString const &)*arg3); +- wxPyEndAllowThreads(__tstate); +- if (PyErr_Occurred()) SWIG_fail; +- } +- { +-#if wxUSE_UNICODE +- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len()); +-#else +- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len()); +-#endif +- } +- { +- if (temp2) +- delete arg2; +- } +- { +- if (temp3) +- delete arg3; +- } +- return resultobj; +-fail: +- { +- if (temp2) +- delete arg2; +- } +- { +- if (temp3) +- delete arg3; +- } +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_XmlNode_AddAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { +- PyObject *resultobj = 0; +- wxXmlNode *arg1 = (wxXmlNode *) 0 ; +- wxString *arg2 = 0 ; +- wxString *arg3 = 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; +- bool temp2 = false ; +- bool temp3 = false ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- PyObject * obj2 = 0 ; +- char * kwnames[] = { +- (char *) "self",(char *) "attrName",(char *) "value", NULL +- }; +- +- if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:XmlNode_AddAttribute",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxXmlNode, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmlNode_AddAttribute" "', expected argument " "1"" of type '" "wxXmlNode *""'"); +- } +- arg1 = reinterpret_cast< wxXmlNode * >(argp1); +- { +- arg2 = wxString_in_helper(obj1); +- if (arg2 == NULL) SWIG_fail; +- temp2 = true; +- } +- { +- arg3 = wxString_in_helper(obj2); +- if (arg3 == NULL) SWIG_fail; +- temp3 = true; +- } +- { +- PyThreadState* __tstate = wxPyBeginAllowThreads(); +- (arg1)->AddAttribute((wxString const &)*arg2,(wxString const &)*arg3); +- wxPyEndAllowThreads(__tstate); +- if (PyErr_Occurred()) SWIG_fail; +- } +- resultobj = SWIG_Py_Void(); +- { +- if (temp2) +- delete arg2; +- } +- { +- if (temp3) +- delete arg3; +- } +- return resultobj; +-fail: +- { +- if (temp2) +- delete arg2; +- } +- { +- if (temp3) +- delete arg3; +- } +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_XmlNode_GetAttributes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- wxXmlNode *arg1 = (wxXmlNode *) 0 ; +- wxXmlProperty *result = 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; +- PyObject *swig_obj[1] ; +- +- if (!args) SWIG_fail; +- swig_obj[0] = args; +- res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxXmlNode, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmlNode_GetAttributes" "', expected argument " "1"" of type '" "wxXmlNode const *""'"); +- } +- arg1 = reinterpret_cast< wxXmlNode * >(argp1); +- { +- PyThreadState* __tstate = wxPyBeginAllowThreads(); +- result = (wxXmlProperty *)((wxXmlNode const *)arg1)->GetAttributes(); +- wxPyEndAllowThreads(__tstate); +- if (PyErr_Occurred()) SWIG_fail; +- } +- resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxXmlProperty, 0 | 0 ); +- return resultobj; +-fail: +- return NULL; +-} +- +- + SWIGINTERN PyObject *XmlNode_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; +@@ -9050,9 +8893,6 @@ static PyMethodDef SwigMethods[] = { + { (char *)"XmlNode_SetNext", (PyCFunction) _wrap_XmlNode_SetNext, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"XmlNode_SetChildren", (PyCFunction) _wrap_XmlNode_SetChildren, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"XmlNode_SetProperties", (PyCFunction) _wrap_XmlNode_SetProperties, METH_VARARGS | METH_KEYWORDS, NULL}, +- { (char *)"XmlNode_GetAttribute", (PyCFunction) _wrap_XmlNode_GetAttribute, METH_VARARGS | METH_KEYWORDS, NULL}, +- { (char *)"XmlNode_AddAttribute", (PyCFunction) _wrap_XmlNode_AddAttribute, METH_VARARGS | METH_KEYWORDS, NULL}, +- { (char *)"XmlNode_GetAttributes", (PyCFunction)_wrap_XmlNode_GetAttributes, METH_O, NULL}, + { (char *)"XmlNode_swigregister", XmlNode_swigregister, METH_VARARGS, NULL}, + { (char *)"XmlNode_swiginit", XmlNode_swiginit, METH_VARARGS, NULL}, + { (char *)"new_XmlDocument", (PyCFunction) _wrap_new_XmlDocument, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython.spec b/wxPython.spec index 64271e7..0dc4acb 100644 --- a/wxPython.spec +++ b/wxPython.spec @@ -1,35 +1,31 @@ -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %define buildflags WXPORT=gtk2 UNICODE=1 Name: wxPython -Version: 2.8.9.2 -Release: 3%{?dist} +Version: 2.8.10.1 +Release: 1%{?dist} Summary: GUI toolkit for the Python programming language Group: Development/Languages License: LGPLv2+ and wxWidgets URL: http://www.wxpython.org/ -Source0: http://dl.sf.net/wxpython/wxPython-src-%{version}.tar.bz2 +Source0: http://downloads.sourceforge.net/wxpython/%{name}-src-%{version}.tar.bz2 # http://trac.wxwidgets.org/ticket/10703 Patch0: wxPython-2.8.9.2-treelist.patch +# backport to wxGTK 2.8.10 API +Patch1: wxPython-2.8.10-backport.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # make sure to keep this updated as appropriate -BuildRequires: wxGTK-devel >= 2.8.9 -BuildRequires: pkgconfig -BuildRequires: zlib-devel, libpng-devel, libjpeg-devel, libtiff-devel -BuildRequires: libGL-devel, libGLU-devel -BuildRequires: python-devel, wxGTK-gl +BuildRequires: wxGTK-devel >= 2.8.10 +BuildRequires: python-devel # packages should depend on "wxPython", not "wxPythonGTK2", but in case # one does, here's the provides for it. Provides: wxPythonGTK2 = %{version}-%{release} -# time for this to go away. -Obsoletes: compat-wxPythonGTK < 2.8.4.0 - %description wxPython is a GUI toolkit for the Python programming language. It allows Python programmers to create programs with a robust, highly functional @@ -63,6 +59,7 @@ Documentation, samples and demo application for wxPython. %prep %setup -q -n wxPython-src-%{version} %patch0 -p1 -b .treelist +%patch1 -p1 # fix libdir otherwise additional wx libs cannot be found sed -i -e 's|/usr/lib|%{_libdir}|' wxPython/config.py @@ -121,6 +118,16 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jan 16 2010 Dan Horák - 2.8.10.1-1 +- update to 2.8.10.1 +- backport to wxGTK 2.8.10 API +- cleaned up BRs + +* Thu Jan 7 2010 Hans de Goede - 2.8.9.2-4 +- Change python_foo macros to use %%global as the new rpm will break + using %%define here, see: + https://www.redhat.com/archives/fedora-devel-list/2010-January/msg00093.html + * Mon Jul 27 2009 Fedora Release Engineering - 2.8.9.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild From 67bd4d24b6cb87c857477cb662ca3cb88b98d91f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 17 Mar 2010 11:12:17 +0000 Subject: [PATCH 3/8] - add missing module (#573961) --- wxPython-2.8.10.1-ebmlib.patch | 1417 ++++++++++++++++++++++++++++++++ wxPython.spec | 8 +- 2 files changed, 1424 insertions(+), 1 deletion(-) create mode 100644 wxPython-2.8.10.1-ebmlib.patch diff --git a/wxPython-2.8.10.1-ebmlib.patch b/wxPython-2.8.10.1-ebmlib.patch new file mode 100644 index 0000000..52b1c97 --- /dev/null +++ b/wxPython-2.8.10.1-ebmlib.patch @@ -0,0 +1,1417 @@ +diff -Naur wxPython-src-2.8.10.1-orig/wxPython/setup.py wxPython-src-2.8.10.1/wxPython/setup.py +--- wxPython-src-2.8.10.1-orig/wxPython/setup.py 2009-06-06 14:43:00.000000000 -0400 ++++ wxPython-src-2.8.10.1/wxPython/setup.py 2009-06-06 14:43:55.000000000 -0400 +@@ -882,6 +882,7 @@ + 'wx.tools.Editra', + 'wx.tools.Editra.src', + 'wx.tools.Editra.src.autocomp', ++ 'wx.tools.Editra.src.ebmlib', + 'wx.tools.Editra.src.eclib', + 'wx.tools.Editra.src.extern', + 'wx.tools.Editra.src.syntax', +diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/__init__.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/__init__.py +--- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/__init__.py 1969-12-31 19:00:00.000000000 -0500 ++++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/__init__.py 2009-06-06 03:48:10.000000000 -0400 +@@ -0,0 +1,33 @@ ++############################################################################### ++# Name: __init__.py # ++# Purpose: Editra Buisness Model Library # ++# Author: Cody Precord # ++# Copyright: (c) 2009 Cody Precord # ++# Licence: wxWindows Licence # ++############################################################################### ++ ++""" ++Editra Buisness Model Library: ++ ++""" ++ ++__author__ = "Cody Precord " ++__cvsid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" ++__revision__ = "$Revision: 1.1 $" ++ ++#-----------------------------------------------------------------------------# ++ ++# Text Utils ++from searcheng import * ++from fchecker import * ++from fileutil import * ++from fileimpl import * ++ ++from backupmgr import * ++ ++# Storage Classes ++from histcache import * ++from clipboard import * ++ ++# Misc ++from miscutil import * +diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/backupmgr.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/backupmgr.py +--- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/backupmgr.py 1969-12-31 19:00:00.000000000 -0500 ++++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/backupmgr.py 2009-06-06 03:48:10.000000000 -0400 +@@ -0,0 +1,160 @@ ++############################################################################### ++# Name: backupmgr.py # ++# Purpose: File Backup Manager # ++# Author: Cody Precord # ++# Copyright: (c) 2009 Cody Precord # ++# Licence: wxWindows Licence # ++############################################################################### ++ ++""" ++Editra Buisness Model Library: FileBackupMgr ++ ++Helper class for managing and creating backups of files. ++ ++""" ++ ++__author__ = "Cody Precord " ++__cvsid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" ++__revision__ = "$Revision: 1.1 $" ++ ++__all__ = [ 'FileBackupMgr', ] ++ ++#-----------------------------------------------------------------------------# ++# Imports ++import os ++import shutil ++ ++# Local Imports ++import fileutil ++import fchecker ++ ++#-----------------------------------------------------------------------------# ++ ++class FileBackupMgr(object): ++ """File backup creator and manager""" ++ def __init__(self, header=None, template=u"%s~"): ++ """Create a BackupManager ++ @keyword header: header to id backups with (Text files only!!) ++ @keyword template: template string for naming backup file with ++ ++ """ ++ object.__init__(self) ++ ++ # Attributes ++ self.checker = fchecker.FileTypeChecker() ++ self.header = header # Backup id header ++ self.template = template # Filename template ++ ++ def _CheckHeader(self, fname): ++ """Check if the backup file has a header that matches the ++ header used to identify backup files. ++ @param fname: name of file to check ++ @return: bool (True if header is ok, False otherwise) ++ ++ """ ++ isok = False ++ try: ++ handle = open(fname) ++ line = handle.readline() ++ isok = line.startswith(self.header) ++ except: ++ isok = False ++ finally: ++ handle.close() ++ return isok ++ ++ def GetBackupFilename(self, fname): ++ """Get the unique name for the files backup copy ++ @param fname: string (file path) ++ @return: string ++ ++ """ ++ rname = self.template % fname ++ if self.header is not None and \ ++ not self.checker.IsBinary(fname) and \ ++ os.path.exists(rname): ++ # Make sure that the template backup name does not match ++ # an existing file that is not a backup file. ++ while not self._CheckHeader(rname): ++ rname = self.template % rname ++ ++ return rname ++ ++ def GetBackupWriter(self, fileobj): ++ """Create a backup filewriter method to backup a files contents ++ with. ++ @param fileobj: object implementing fileimpl.FileObjectImpl interface ++ @return: callable(text) to create backup with ++ ++ """ ++ nfile = fileobj.Clone() ++ fname = self.GetBackupFilename(nfile.GetPath()) ++ nfile.SetPath(fname) ++ # Write the header if it is enabled ++ if self.header is not None and not self.checker.IsBinary(fname): ++ nfile.Write(self.header + os.linesep) ++ return nfile.Write ++ ++ def HasBackup(self, fname): ++ """Check if a given file has a backup file available or not ++ @param fname: string (file path) ++ ++ """ ++ backup = self.GetBackupFilename(fname) ++ return os.path.exists(backup) ++ ++ def IsBackupNewer(self, fname): ++ """Is the backup of this file newer than the saved version ++ of the file? ++ @param fname: string (file path) ++ @return: bool ++ ++ """ ++ backup = self.GetBackupFilename(fname) ++ if os.path.exists(fname) and os.path.exists(backup): ++ mod1 = fileutil.GetFileModTime(backup) ++ mod2 = fileutil.GetFileModTime(fname) ++ return mod1 > mod2 ++ else: ++ return False ++ ++ def MakeBackupCopy(self, fname): ++ """Create a backup copy of the given filename ++ @param fname: string (file path) ++ @return: bool (True == Success) ++ ++ """ ++ backup = self.GetBackupFilename(fname) ++ try: ++ if os.path.exists(backup): ++ os.remove(backup) ++ ++ shutil.copy2(fname, backup) ++ except: ++ return False ++ else: ++ return True ++ ++ def MakeBackupCopyAsync(self, fname): ++ """Do the backup asyncronously ++ @param fname: string (file path) ++ @todo: Not implemented yet ++ ++ """ ++ raise NotImplementedError("TODO: implement once threadpool is finished") ++ ++ def SetBackupFileTemplate(self, tstr): ++ """Set the filename template for generating the backupfile name ++ @param tstr: template string i.e) %s~ ++ ++ """ ++ assert tstr.count("%s") == 1, "Format statment must only have one arg" ++ self.template = tstr ++ ++ def SetHeader(self, header): ++ """Set the header string for identifying a file as a backup ++ @param header: string (single line only) ++ ++ """ ++ assert '\n' not in header, "Header must only be a single line" ++ self.header = header +diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/clipboard.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/clipboard.py +--- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/clipboard.py 1969-12-31 19:00:00.000000000 -0500 ++++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/clipboard.py 2009-06-06 03:48:10.000000000 -0400 +@@ -0,0 +1,135 @@ ++############################################################################### ++# Name: histcache.py # ++# Purpose: History Cache # ++# Author: Cody Precord # ++# Copyright: (c) 2009 Cody Precord # ++# Licence: wxWindows Licence # ++############################################################################### ++ ++""" ++Editra Buisness Model Library: Clipboard ++ ++Clipboard helper class ++ ++""" ++ ++__author__ = "Hasan Aljudy" ++__cvsid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" ++__revision__ = "$Revision: 1.1 $" ++ ++__all__ = [ 'Clipboard',] ++ ++#-----------------------------------------------------------------------------# ++# Imports ++import wx ++ ++#-----------------------------------------------------------------------------# ++ ++class Clipboard(object): ++ """Multiple clipboards as named registers (as per vim) ++ ++ " is an alias for system clipboard and is also the default clipboard. ++ ++ @note: The only way to access multiple clipboards right now is through ++ Normal mode when Vi(m) emulation is enabled. ++ ++ """ ++ NAMES = list(u'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_') ++ registers = {} ++ current = u'"' ++ ++ @classmethod ++ def Switch(cls, reg): ++ """Switch to register ++ @param reg: char ++ ++ """ ++ if reg in cls.NAMES or reg == u'"': ++ cls.current = reg ++ else: ++ raise Exception(u"Switched to invalid register name") ++ ++ @classmethod ++ def NextFree(cls, reg): ++ """Switch to the next free register. If current register is free, no ++ switching happens. ++ ++ A free register is one that's either unused or has no content ++ ++ @param reg: char ++ @note: This is not used yet. ++ ++ """ ++ if cls.Get() == u'': ++ return ++ ++ for name in cls.NAMES: ++ if cls.registers.get(name, u'') == u'': ++ cls.Switch(name) ++ break ++ ++ @classmethod ++ def AllUsed(cls): ++ """Get a dictionary mapping all used clipboards (plus the system ++ clipboard) to their content. ++ ++ @note: This is not used yet. ++ ++ """ ++ cmd_map = { u'"': cls.SystemGet() } ++ for name in cls.NAMES: ++ if cls.registers.get(name, u''): ++ cmd_map[name] = cls.registers[name] ++ return cmd_map ++ ++ @classmethod ++ def Get(cls): ++ """Get the content of the current register. Used for pasting""" ++ if cls.current == u'"': ++ return cls.SystemGet() ++ else: ++ return cls.registers.get( cls.current, u'' ) ++ ++ @classmethod ++ def Set(cls, text): ++ """Set the content of the current register ++ @param text: string ++ ++ """ ++ if cls.current == u'"': ++ return cls.SystemSet(text) ++ else: ++ cls.registers[cls.current] = text ++ ++ @classmethod ++ def SystemGet(cls): ++ """Get text from the system clipboard ++ @return: string ++ ++ """ ++ text = None ++ if wx.TheClipboard.Open(): ++ if wx.TheClipboard.IsSupported(wx.DataFormat(wx.DF_TEXT)): ++ text = wx.TextDataObject() ++ wx.TheClipboard.GetData(text) ++ ++ wx.TheClipboard.Close() ++ ++ if text is not None: ++ return text.GetText() ++ else: ++ return u'' ++ ++ @classmethod ++ def SystemSet(cls, text): ++ """Set text into the system clipboard ++ @param text: string ++ @return: bool ++ ++ """ ++ ok = False ++ if wx.TheClipboard.Open(): ++ wx.TheClipboard.SetData(wx.TextDataObject(text)) ++ wx.TheClipboard.Close() ++ ok = True ++ return ok +\ No newline at end of file +diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/fchecker.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/fchecker.py +--- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/fchecker.py 1969-12-31 19:00:00.000000000 -0500 ++++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/fchecker.py 2009-06-06 03:48:10.000000000 -0400 +@@ -0,0 +1,82 @@ ++############################################################################### ++# Name: fchecker.py # ++# Purpose: Filetype checker object. # ++# Author: Cody Precord # ++# Copyright: (c) 2009 Cody Precord # ++# Licence: wxWindows Licence # ++############################################################################### ++ ++""" ++Editra Buisness Model Library: FileTypeChecker ++ ++Helper class for checking what kind of a content a file contains. ++ ++""" ++ ++__author__ = "Cody Precord " ++__cvsid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" ++__revision__ = "$Revision: 1.1 $" ++ ++__all__ = [ 'FileTypeChecker', ] ++ ++#-----------------------------------------------------------------------------# ++# Imports ++import os ++ ++#-----------------------------------------------------------------------------# ++ ++class FileTypeChecker(object): ++ """File type checker and recognizer""" ++ TXTCHARS = ''.join(map(chr, [7, 8, 9, 10, 12, 13, 27] + range(0x20, 0x100))) ++ ALLBYTES = ''.join(map(chr, range(256))) ++ ++ def __init__(self, preread=4096): ++ """Create the FileTypeChecker ++ @keyword preread: number of bytes to read for checking file type ++ ++ """ ++ object.__init__(self) ++ ++ # Attributes ++ self._preread = preread ++ ++ @staticmethod ++ def _GetHandle(fname): ++ """Get a file handle for reading ++ @param fname: filename ++ @return: file object or None ++ ++ """ ++ try: ++ handle = open(fname, 'rb') ++ except: ++ handle = None ++ return handle ++ ++ def IsBinary(self, fname): ++ """Is the file made up of binary data ++ @param fname: filename to check ++ @return: bool ++ ++ """ ++ handle = self._GetHandle(fname) ++ if handle is not None: ++ bytes = handle.read(self._preread) ++ handle.close() ++ nontext = bytes.translate(FileTypeChecker.ALLBYTES, ++ FileTypeChecker.TXTCHARS) ++ return bool(nontext) ++ else: ++ return False ++ ++ def IsReadableText(self, fname): ++ """Is the given path readable as text. Will return True if the ++ file is accessable by current user and is plain text. ++ @param fname: filename ++ @return: bool ++ ++ """ ++ f_ok = False ++ if os.access(fname, os.R_OK): ++ f_ok = not self.IsBinary(fname) ++ return f_ok +diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/fileimpl.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/fileimpl.py +--- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/fileimpl.py 1969-12-31 19:00:00.000000000 -0500 ++++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/fileimpl.py 2009-06-06 03:48:10.000000000 -0400 +@@ -0,0 +1,215 @@ ++############################################################################### ++# Name: Cody Precord # ++# Purpose: File Object Interface Implementation # ++# Author: Cody Precord # ++# Copyright: (c) 2009 Cody Precord # ++# License: wxWindows License # ++############################################################################### ++ ++""" ++Editra Buisness Model Library: FileObjectImpl ++ ++Implementation of a file object interface class. Objects and methods inside ++of this library expect a file object that derives from this interface. ++ ++""" ++ ++__author__ = "Cody Precord " ++__svnid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" ++__revision__ = "$Revision: 1.1 $" ++ ++#--------------------------------------------------------------------------# ++# Imports ++import os ++ ++# Editra Buisness Model Imports ++import fileutil ++ ++#--------------------------------------------------------------------------# ++ ++class FileObjectImpl(object): ++ """File Object Interface implementation base class""" ++ def __init__(self, path=u'', modtime=0): ++ object.__init__(self) ++ ++ # Attributes ++ self._path = path ++ self._modtime = modtime ++ ++ self._handle = None ++ self.open = False ++ ++ self.last_err = None ++ ++ def ClearLastError(self): ++ """Reset the error marker on this file""" ++ del self.last_err ++ self.last_err = None ++ ++ def Clone(self): ++ """Clone the file object ++ @return: FileObject ++ ++ """ ++ fileobj = FileObjectImpl(self._path, self._modtime) ++ fileobj.SetLastError(self.last_err) ++ return fileobj ++ ++ def Close(self): ++ """Close the file handle ++ @note: this is normally done automatically after a read/write operation ++ ++ """ ++ try: ++ self._handle.close() ++ except: ++ pass ++ ++ self.open = False ++ ++ def DoOpen(self, mode): ++ """Opens and creates the internal file object ++ @param mode: mode to open file in ++ @return: True if opened, False if not ++ @postcondition: self._handle is set to the open handle ++ ++ """ ++ if not len(self._path): ++ return False ++ ++ try: ++ file_h = open(self._path, mode) ++ except (IOError, OSError), msg: ++ self.last_err = msg ++ return False ++ else: ++ self._handle = file_h ++ self.open = True ++ return True ++ ++ def GetExtension(self): ++ """Get the files extension if it has one else simply return the ++ filename minus the path. ++ @return: string file extension (no dot) ++ ++ """ ++ fname = os.path.split(self._path) ++ return fname[-1].split(os.extsep)[-1].lower() ++ ++ def GetHandle(self): ++ """Get this files handle""" ++ return self._handle ++ ++ def GetLastError(self): ++ """Return the last error that occured when using this file ++ @return: err traceback or None ++ ++ """ ++ return unicode(self.last_err).replace("u'", "'") ++ ++ def GetModtime(self): ++ """Get the timestamp of this files last modification""" ++ return self._modtime ++ ++ def GetPath(self): ++ """Get the path of the file ++ @return: string ++ ++ """ ++ return self._path ++ ++ def GetSize(self): ++ """Get the size of the file ++ @return: int ++ ++ """ ++ if self._path: ++ return fileutil.GetFileSize(self._path) ++ else: ++ return 0 ++ ++ @property ++ def Handle(self): ++ """Raw file handle property""" ++ return self._handle ++ ++ def IsOpen(self): ++ """Check if file is open or not ++ @return: bool ++ ++ """ ++ return self.open ++ ++ def IsReadOnly(self): ++ """Is the file Read Only ++ @return: bool ++ ++ """ ++ if os.path.exists(self._path): ++ return not os.access(self._path, os.R_OK|os.W_OK) ++ else: ++ return False ++ ++ @property ++ def Modtime(self): ++ """File modification time propery""" ++ return self.GetModtime() ++ ++ @property ++ def ReadOnly(self): ++ """Is the file read only?""" ++ return self.IsReadOnly() ++ ++ def ResetAll(self): ++ """Reset all file attributes""" ++ self._handle = None ++ self.open = False ++ self._path = u'' ++ self._modtime = 0 ++ self.last_err = None ++ ++ def SetLastError(self, err): ++ """Set the last error ++ @param err: exception object / msg ++ ++ """ ++ self.last_err = err ++ ++ def SetPath(self, path): ++ """Set the path of the file ++ @param path: absolute path to file ++ ++ """ ++ self._path = path ++ ++ def SetModTime(self, mtime): ++ """Set the modtime of this file ++ @param mtime: long int to set modtime to ++ ++ """ ++ self._modtime = mtime ++ ++ #--- SHould be overridden by subclass ---# ++ ++ def Read(self): ++ """Open/Read the file ++ @return: string (file contents) ++ ++ """ ++ txt = u'' ++ if self.DoOpen('rb'): ++ try: ++ txt = self._handle.read() ++ except: ++ pass ++ ++ return txt ++ ++ def Write(self, value): ++ """Open/Write the value to disk ++ @param value: string ++ ++ """ ++ if self.DoOpen('wb'): ++ self._handle.write(value) ++ self._handle.close() +diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/fileutil.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/fileutil.py +--- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/fileutil.py 1969-12-31 19:00:00.000000000 -0500 ++++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/fileutil.py 2009-06-06 03:48:10.000000000 -0400 +@@ -0,0 +1,180 @@ ++############################################################################### ++# Name: fileutil.py # ++# Purpose: File Management Utilities. # ++# Author: Cody Precord # ++# Copyright: (c) 2009 Cody Precord # ++# Licence: wxWindows Licence # ++############################################################################### ++ ++""" ++Editra Buisness Model Library: File Utilities ++ ++Utility functions for managing and working with files. ++ ++""" ++ ++__author__ = "Cody Precord " ++__svnid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" ++__revision__ = "$Revision: 1.1 $" ++ ++__all__ = [ 'GetFileModTime', 'GetFileSize', 'GetUniqueName', 'MakeNewFile', ++ 'MakeNewFolder', 'GetFileExtension', 'GetFileName', 'GetPathName', ++ 'ResolveRealPath', 'IsLink' ] ++ ++#-----------------------------------------------------------------------------# ++# Imports ++import os ++import platform ++import stat ++ ++UNIX = WIN = False ++if platform.system().lower() in ['windows', 'microsoft']: ++ WIN = True ++ try: ++ # Check for if win32 extensions are available ++ import win32com.client as win32client ++ except ImportError: ++ win32client = None ++else: ++ UNIX = True ++ ++#-----------------------------------------------------------------------------# ++ ++def GetFileExtension(file_str): ++ """Gets last atom at end of string as extension if ++ no extension whole string is returned ++ @param file_str: path or file name to get extension from ++ ++ """ ++ return file_str.split('.')[-1] ++ ++def GetFileModTime(file_name): ++ """Returns the time that the given file was last modified on ++ @param file_name: path of file to get mtime of ++ ++ """ ++ try: ++ mod_time = os.path.getmtime(file_name) ++ except (OSError, EnvironmentError): ++ mod_time = 0 ++ return mod_time ++ ++def GetFileName(path): ++ """Gets last atom on end of string as filename ++ @param path: full path to get filename from ++ ++ """ ++ return os.path.split(path)[-1] ++ ++def GetFileSize(path): ++ """Get the size of the file at a given path ++ @param path: Path to file ++ @return: long ++ ++ """ ++ try: ++ return os.stat(path)[stat.ST_SIZE] ++ except: ++ return 0 ++ ++def GetPathName(path): ++ """Gets the path minus filename ++ @param path: full path to get base of ++ ++ """ ++ return os.path.split(path)[0] ++ ++def IsLink(path): ++ """Is the file a link ++ @return: bool ++ ++ """ ++ if WIN: ++ return path.endswith(".lnk") or os.path.islink(path) ++ else: ++ return os.path.islink(path) ++ ++def ResolveRealPath(link): ++ """Return the real path of the link file ++ @param link: path of link file ++ @return: string ++ ++ """ ++ assert IsLink(link), "ResolveRealPath expects a link file!" ++ realpath = link ++ if WIN and win32client is not None: ++ shell = win32client.Dispatch("WScript.Shell") ++ shortcut = shell.CreateShortCut(link) ++ realpath = shortcut.Targetpath ++ else: ++ realpath = os.path.realpath(link) ++ return realpath ++ ++#-----------------------------------------------------------------------------# ++ ++def GetUniqueName(path, name): ++ """Make a file name that will be unique in case a file of the ++ same name already exists at that path. ++ @param path: Root path to folder of files destination ++ @param name: desired file name base ++ @return: string ++ ++ """ ++ tmpname = os.path.join(path, name) ++ if os.path.exists(tmpname): ++ if '.' not in name: ++ ext = '' ++ fbase = name ++ else: ++ ext = '.' + name.split('.')[-1] ++ fbase = name[:-1 * len(ext)] ++ ++ inc = len([x for x in os.listdir(path) if x.startswith(fbase)]) ++ tmpname = os.path.join(path, "%s-%d%s" % (fbase, inc, ext)) ++ while os.path.exists(tmpname): ++ inc = inc + 1 ++ tmpname = os.path.join(path, "%s-%d%s" % (fbase, inc, ext)) ++ ++ return tmpname ++ ++ ++#-----------------------------------------------------------------------------# ++ ++def MakeNewFile(path, name): ++ """Make a new file at the given path with the given name. ++ If the file already exists, the given name will be changed to ++ a unique name in the form of name + -NUMBER + .extension ++ @param path: path to directory to create file in ++ @param name: desired name of file ++ @return: Tuple of (success?, Path of new file OR Error message) ++ ++ """ ++ if not os.path.isdir(path): ++ path = os.path.dirname(path) ++ fname = GetUniqueName(path, name) ++ ++ try: ++ open(fname, 'w').close() ++ except (IOError, OSError), msg: ++ return (False, str(msg)) ++ ++ return (True, fname) ++ ++def MakeNewFolder(path, name): ++ """Make a new folder at the given path with the given name. ++ If the folder already exists, the given name will be changed to ++ a unique name in the form of name + -NUMBER. ++ @param path: path to create folder on ++ @param name: desired name for folder ++ @return: Tuple of (success?, new dirname OR Error message) ++ ++ """ ++ if not os.path.isdir(path): ++ path = os.path.dirname(path) ++ folder = GetUniqueName(path, name) ++ try: ++ os.mkdir(folder) ++ except (OSError, IOError), msg: ++ return (False, str(msg)) ++ ++ return (True, folder) +diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/histcache.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/histcache.py +--- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/histcache.py 1969-12-31 19:00:00.000000000 -0500 ++++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/histcache.py 2009-06-06 03:48:10.000000000 -0400 +@@ -0,0 +1,131 @@ ++############################################################################### ++# Name: histcache.py # ++# Purpose: History Cache # ++# Author: Cody Precord # ++# Copyright: (c) 2009 Cody Precord # ++# Licence: wxWindows Licence # ++############################################################################### ++ ++""" ++Editra Buisness Model Library: HistoryCache ++ ++History cache that acts as a stack for managing a history list o ++ ++""" ++ ++__author__ = "Cody Precord " ++__cvsid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" ++__revision__ = "$Revision: 1.1 $" ++ ++__all__ = [ 'HistoryCache', 'HIST_CACHE_UNLIMITED'] ++ ++#-----------------------------------------------------------------------------# ++# Imports ++ ++#-----------------------------------------------------------------------------# ++# Globals ++HIST_CACHE_UNLIMITED = -1 ++ ++#-----------------------------------------------------------------------------# ++ ++class HistoryCache(object): ++ def __init__(self, max_size=HIST_CACHE_UNLIMITED): ++ object.__init__(self) ++ ++ # Attributes ++ self._list = list() ++ self.cpos = -1 ++ self.max_size = max_size ++ ++ def _Resize(self): ++ """Adjust cache size based on max size setting""" ++ if self.max_size != HIST_CACHE_UNLIMITED: ++ lsize = len(self._list) ++ if lsize: ++ adj = self.max_size - lsize ++ if adj < 0: ++ self._list.pop(0) ++ self.cpos = len(self._list) - 1 ++ ++ def Clear(self): ++ """Clear the history cache""" ++ del self._list ++ self._list = list() ++ self.cpos = -1 ++ ++ def GetSize(self): ++ """Get the current size of the cache ++ @return: int (number of items in the cache) ++ ++ """ ++ return len(self._list) ++ ++ def GetMaxSize(self): ++ """Get the max size of the cache ++ @return: int ++ ++ """ ++ return self.max_size ++ ++ def GetNextItem(self): ++ """Get the next item in the history cache, moving the ++ current postion towards the end of the cache. ++ @return: object or None if at end of list ++ ++ """ ++ item = None ++ if self.cpos < len(self._list) - 1: ++ self.cpos += 1 ++ item = self._list[self.cpos] ++ return item ++ ++ def GetPreviousItem(self): ++ """Get the previous item in the history cache, moving the ++ current postion towards the begining of the cache. ++ @return: object or None if at start of list ++ ++ """ ++ item = None ++ if self.cpos >= 0: ++ item = self._list[self.cpos] ++ self.cpos -= 1 ++ return item ++ ++ def HasPrevious(self): ++ """Are there more items to the left of the current position ++ @return: bool ++ ++ """ ++ more = self.cpos >= 0 ++ return more ++ ++ def HasNext(self): ++ """Are there more items to the right of the current position ++ @return: bool ++ ++ """ ++ if self.cpos == -1 and len(self._list): ++ more = True ++ else: ++ more = self.cpos >= 0 and self.cpos < len(self._list) ++ return more ++ ++ def PutItem(self, item): ++ """Put an item on the top of the cache ++ @param item: object ++ ++ """ ++ if self.cpos != len(self._list) - 1: ++ self._list = self._list[:self.cpos] ++ self._list.append(item) ++ self.cpos += 1 ++ self._Resize() ++ ++ def SetMaxSize(self, max_size): ++ """Set the maximum size of the cache ++ @param max_size: int (HIST_CACHE_UNLIMITED for unlimited size) ++ ++ """ ++ assert max_size > 0 or max_size == 1, "Invalid max size" ++ self.max_size = max_size ++ self._Resize() +diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/miscutil.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/miscutil.py +--- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/miscutil.py 1969-12-31 19:00:00.000000000 -0500 ++++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/miscutil.py 2009-06-06 03:48:10.000000000 -0400 +@@ -0,0 +1,33 @@ ++############################################################################### ++# Name: miscutil.py # ++# Purpose: Various helper functions. # ++# Author: Cody Precord # ++# Copyright: (c) 2009 Cody Precord # ++# Licence: wxWindows Licence # ++############################################################################### ++ ++""" ++Editra Buisness Model Library: MiscUtil ++ ++Various helper functions ++ ++""" ++ ++__author__ = "Cody Precord " ++__cvsid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" ++__revision__ = "$Revision: 1.1 $" ++ ++__all__ = [ 'MinMax', ] ++ ++#-----------------------------------------------------------------------------# ++# Imports ++ ++#-----------------------------------------------------------------------------# ++ ++def MinMax(arg1, arg2): ++ """Return an ordered tuple of the minumum and maximum value ++ of the two args. ++ @return: tuple ++ ++ """ ++ return min(arg1, arg2), max(arg1, arg2) +diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/searcheng.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/searcheng.py +--- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/searcheng.py 1969-12-31 19:00:00.000000000 -0500 ++++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/searcheng.py 2009-06-06 03:48:10.000000000 -0400 +@@ -0,0 +1,400 @@ ++############################################################################### ++# Name: searcheng.py # ++# Purpose: Text search engine and utilities # ++# Author: Cody Precord # ++# Copyright: (c) 2009 Cody Precord # ++# Licence: wxWindows Licence # ++############################################################################### ++ ++""" ++Editra Buisness Model Library: SearchEngine ++ ++Text Search Engine for finding text and grepping files ++ ++""" ++ ++__author__ = "Cody Precord " ++__cvsid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" ++__revision__ = "$Revision: 1.1 $" ++ ++__all__ = [ 'SearchEngine', ] ++ ++#-----------------------------------------------------------------------------# ++# Imports ++import os ++import re ++import fnmatch ++import types ++from StringIO import StringIO ++ ++# Local imports ++import fchecker ++ ++#-----------------------------------------------------------------------------# ++ ++class SearchEngine(object): ++ """Text Search Engine ++ All Search* methods are iterable generators ++ All Find* methods do a complete search and return the match collection ++ @summary: Text Search Engine ++ @todo: Add file filter support ++ ++ """ ++ def __init__(self, query, regex=True, down=True, ++ matchcase=True, wholeword=False): ++ """Initialize a search engine object ++ @param query: search string ++ @keyword regex: Is a regex search ++ @keyword down: Search down or up ++ @keyword matchcase: Match case ++ @keyword wholeword: Match whole word ++ ++ """ ++ object.__init__(self) ++ ++ # Attributes ++ self._isregex = regex ++ self._next = down ++ self._matchcase = matchcase ++ self._wholeword = wholeword ++ self._unicode = False ++ self._query = query ++ self._regex = u'' ++ self._pool = u'' ++ self._lmatch = None # Last match object ++ self._filters = None # File Filters ++ self._formatter = lambda f, l, m: u"%s %d: %s" % (f, l+1, m) ++ self._CompileRegex() ++ ++ def _CompileRegex(self): ++ """Prepare and compile the regex object based on the current state ++ and settings of the engine. ++ @postcondition: the engines regular expression is created ++ ++ """ ++ tmp = self._query ++ if not self._isregex: ++ tmp = re.escape(tmp) ++ ++ if self._wholeword: ++ tmp = "\\b%s\\b" % tmp ++ ++ flags = re.MULTILINE ++ ++ if not self._matchcase: ++ flags |= re.IGNORECASE ++ ++ if self._unicode: ++ flags |= re.UNICODE ++ ++ try: ++ self._regex = re.compile(tmp, flags) ++ except: ++ self._regex = None ++ ++ def ClearPool(self): ++ """Clear the search pool""" ++ del self._pool ++ self._pool = u"" ++ ++ def Find(self, spos=0): ++ """Find the next match based on the state of the search engine ++ @keyword spos: search start position ++ @return: tuple (match start pos, match end pos) or None if no match ++ @note: L{SetSearchPool} has been called to set search string ++ ++ """ ++ if self._regex is None: ++ return None ++ ++ if self._next: ++ return self.FindNext(spos) ++ else: ++ if spos == 0: ++ spos = -1 ++ return self.FindPrev(spos) ++ ++ def FindAll(self): ++ """Find all the matches in the current context ++ @return: list of tuples [(start1, end1), (start2, end2), ] ++ ++ """ ++ if self._regex is None: ++ return list() ++ ++ matches = [match for match in self._regex.finditer(self._pool)] ++ return matches ++ ++ def FindAllLines(self): ++ """Find all the matches in the current context ++ @return: list of strings ++ ++ """ ++ rlist = list() ++ if self._regex is None: ++ return rlist ++ ++ for lnum, line in enumerate(StringIO(self._pool)): ++ if self._regex.search(line) is not None: ++ rlist.append(self._formatter(u"Untitled", lnum, line)) ++ ++ return rlist ++ ++ def FindNext(self, spos=0): ++ """Find the next match of the query starting at spos ++ @keyword spos: search start position in string ++ @return: tuple (match start pos, match end pos) or None if no match ++ @note: L{SetSearchPool} has been called to set the string to search in. ++ ++ """ ++ if self._regex is None: ++ return None ++ ++ if spos < len(self._pool): ++ match = self._regex.search(self._pool[spos:]) ++ if match is not None: ++ self._lmatch = match ++ return match.span() ++ return None ++ ++ def FindPrev(self, spos=-1): ++ """Find the previous match of the query starting at spos ++ @keyword spos: search start position in string ++ @return: tuple (match start pos, match end pos) ++ ++ """ ++ if self._regex is None: ++ return None ++ ++ if spos+1 < len(self._pool): ++ matches = [match for match in ++ self._regex.finditer(self._pool[:spos])] ++ if len(matches): ++ lmatch = matches[-1] ++ self._lmatch = lmatch ++ return (lmatch.start(), lmatch.end()) ++ return None ++ ++ def GetLastMatch(self): ++ """Get the last found match object from the previous L{FindNext} or ++ L{FindPrev} action. ++ @return: match object or None ++ ++ """ ++ return self._lmatch ++ ++ def GetOptionsString(self): ++ """Get a string describing the search engines options""" ++ rstring = u"\"%s\" [ " % self._query ++ for desc, attr in (("regex: %s", self._isregex), ++ ("match case: %s", self._matchcase), ++ ("whole word: %s", self._wholeword)): ++ if attr: ++ rstring += (desc % u"on; ") ++ else: ++ rstring += (desc % u"off; ") ++ rstring += u"]" ++ ++ return rstring ++ ++ def GetQuery(self): ++ """Get the raw query string used by the search engine ++ @return: string ++ ++ """ ++ return self._query ++ ++ def GetQueryObject(self): ++ """Get the regex object used for the search. Will return None if ++ there was an error in creating the object. ++ @return: pattern object ++ ++ """ ++ return self._regex ++ ++ def GetSearchPool(self): ++ """Get the search pool string for this L{SearchEngine}. ++ @return: string ++ ++ """ ++ return self._pool ++ ++ def IsMatchCase(self): ++ """Is the engine set to a case sensitive search ++ @return: bool ++ ++ """ ++ return self._matchcase ++ ++ def IsRegEx(self): ++ """Is the engine searching with the query as a regular expression ++ @return: bool ++ ++ """ ++ return self._isregex ++ ++ def IsWholeWord(self): ++ """Is the engine set to search for wholeword matches ++ @return: bool ++ ++ """ ++ return self._wholeword ++ ++ def SearchInBuffer(self, sbuffer): ++ """Search in the buffer ++ @param sbuffer: buffer like object ++ @todo: implement ++ ++ """ ++ raise NotImplementedError ++ ++ def SearchInDirectory(self, directory, recursive=True): ++ """Search in all the files found in the given directory ++ @param directory: directory path ++ @keyword recursive: search recursivly ++ ++ """ ++ if self._regex is None: ++ return ++ ++ # Get all files in the directories ++ paths = [os.path.join(directory, fname) ++ for fname in os.listdir(directory) if not fname.startswith('.')] ++ ++ # Filter out files that don't match the current filter(s) ++ if self._filters is not None and len(self._filters): ++ filtered = list() ++ for fname in paths: ++ if os.path.isdir(fname): ++ filtered.append(fname) ++ continue ++ ++ for pat in self._filters: ++ if fnmatch.fnmatch(fname, pat): ++ filtered.append(fname) ++ paths = filtered ++ ++ # Begin searching in the paths ++ for path in paths: ++ if recursive and os.path.isdir(path): ++ # Recursive call to decend into directories ++ for match in self.SearchInDirectory(path, recursive): ++ yield match ++ else: ++ for match in self.SearchInFile(path): ++ yield match ++ return ++ ++ def SearchInFile(self, fname): ++ """Search in a file for all lines with matches of the set query and ++ yield the results as they are found. ++ @param fname: filename ++ @todo: unicode handling ++ ++ """ ++ if self._regex is None: ++ return ++ ++ checker = fchecker.FileTypeChecker() ++ if checker.IsReadableText(fname): ++ try: ++ fobj = open(fname, 'rb') ++ except (IOError, OSError): ++ return ++ else: ++ # Special token to signify start of a search ++ yield (None, fname) ++ ++ for lnum, line in enumerate(fobj): ++ if self._regex.search(line) is not None: ++ yield self._formatter(fname, lnum, line) ++ fobj.close() ++ return ++ ++ def SearchInFiles(self, flist): ++ """Search in a list of files and yield results as they are found. ++ @param flist: list of file names ++ ++ """ ++ if self._regex is None: ++ return ++ ++ for fname in flist: ++ for match in self.SearchInFile(fname): ++ yield match ++ return ++ ++ def SearchInString(self, sstring, startpos=0): ++ """Search in a string ++ @param sstring: string to search in ++ @keyword startpos: search start position ++ ++ """ ++ raise NotImplementedError ++ ++ def SetFileFilters(self, filters): ++ """Set the file filters to specify what type of files to search in ++ the filter should be a list of wild card patterns to match. ++ @param filters: list of strings ['*.py', '*.pyw'] ++ ++ """ ++ self._filters = filters ++ ++ def SetFlags(self, isregex=None, matchcase=None, wholeword=None, down=None): ++ """Set the search engine flags. Leaving the parameter set to None ++ will not change the flag. Setting it to non None will change the value. ++ @keyword isregex: is regex search ++ @keyword matchcase: matchcase search ++ @keyword wholeword: wholeword search ++ @keyword down: search down or up ++ ++ """ ++ for attr, val in (('_isregex', isregex), ('_matchcase', matchcase), ++ ('_wholeword', wholeword), ('_next', down)): ++ if val is not None: ++ setattr(self, attr, val) ++ self._CompileRegex() ++ ++ def SetMatchCase(self, case=True): ++ """Set whether the engine will use case sensative searches ++ @keyword case: bool ++ ++ """ ++ self._matchcase = case ++ self._CompileRegex() ++ ++ def SetResultFormatter(self, funct): ++ """Set the result formatter function ++ @param funct: callable(filename, linenum, matchstr) ++ ++ """ ++ assert callable(funct) ++ self._formatter = funct ++ ++ def SetSearchPool(self, pool): ++ """Set the search pool used by the Find methods ++ @param pool: string to search in ++ ++ """ ++ del self._pool ++ self._pool = pool ++ if isinstance(self._pool, types.UnicodeType): ++ self._unicode = True ++ self._CompileRegex() ++ ++ def SetQuery(self, query): ++ """Set the search query ++ @param query: string ++ ++ """ ++ self._query = query ++ self._CompileRegex() ++ ++ def SetUseRegex(self, use=True): ++ """Set whether the engine is using regular expresion searches or ++ not. ++ @keyword use: bool ++ ++ """ ++ self._isregex = use ++ self._CompileRegex() diff --git a/wxPython.spec b/wxPython.spec index 0dc4acb..ec91b1e 100644 --- a/wxPython.spec +++ b/wxPython.spec @@ -5,7 +5,7 @@ Name: wxPython Version: 2.8.10.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GUI toolkit for the Python programming language @@ -17,6 +17,8 @@ Source0: http://downloads.sourceforge.net/wxpython/%{name}-src-%{version} Patch0: wxPython-2.8.9.2-treelist.patch # backport to wxGTK 2.8.10 API Patch1: wxPython-2.8.10-backport.patch +# add missing module - https://bugzilla.redhat.com/show_bug.cgi?id=573961 +Patch2: wxPython-2.8.10.1-ebmlib.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # make sure to keep this updated as appropriate BuildRequires: wxGTK-devel >= 2.8.10 @@ -60,6 +62,7 @@ Documentation, samples and demo application for wxPython. %setup -q -n wxPython-src-%{version} %patch0 -p1 -b .treelist %patch1 -p1 +%patch2 -p1 # fix libdir otherwise additional wx libs cannot be found sed -i -e 's|/usr/lib|%{_libdir}|' wxPython/config.py @@ -118,6 +121,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Mar 17 2010 Dan Horák - 2.8.10.1-2 +- add missing module (#573961) + * Sat Jan 16 2010 Dan Horák - 2.8.10.1-1 - update to 2.8.10.1 - backport to wxGTK 2.8.10 API From 0c303f816ca14f8582dc2c48473e282b804d6504 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 8 May 2010 02:28:48 +0000 Subject: [PATCH 4/8] Initialize branch EL-6 for wxPython --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..46381b9 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +EL-6 From 0047267534784669e164f16f48abe8948a41229e Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 11 Jul 2010 20:36:49 +0000 Subject: [PATCH 5/8] Pull from devel --- .cvsignore | 2 +- import.log | 1 + sources | 2 +- wxPython-2.8.10-backport.patch | 390 --------- wxPython-2.8.10.1-ebmlib.patch | 1417 -------------------------------- wxPython-2.8.11.0-aui.patch | 24 + wxPython.spec | 22 +- 7 files changed, 40 insertions(+), 1818 deletions(-) create mode 100644 import.log delete mode 100644 wxPython-2.8.10-backport.patch delete mode 100644 wxPython-2.8.10.1-ebmlib.patch create mode 100644 wxPython-2.8.11.0-aui.patch diff --git a/.cvsignore b/.cvsignore index 5017d43..3a89b5e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -wxPython-src-2.8.10.1.tar.bz2 +wxPython-src-2.8.11.0.tar.bz2 diff --git a/import.log b/import.log new file mode 100644 index 0000000..cb1e33f --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +wxPython-2_8_11_0-1_fc14:EL-6:wxPython-2.8.11.0-1.fc14.src.rpm:1278880487 diff --git a/sources b/sources index 53956ee..08f0993 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -65d5ef166f23fe8b4c67f58df164f93e wxPython-src-2.8.10.1.tar.bz2 +63f73aae49e530852db56a31b57529fa wxPython-src-2.8.11.0.tar.bz2 diff --git a/wxPython-2.8.10-backport.patch b/wxPython-2.8.10-backport.patch deleted file mode 100644 index 0639913..0000000 --- a/wxPython-2.8.10-backport.patch +++ /dev/null @@ -1,390 +0,0 @@ -diff -Nrup wxPython-src-2.8.10.1.orig/wxPython/src/gtk/_core.py wxPython-src-2.8.10.1/wxPython/src/gtk/_core.py ---- wxPython-src-2.8.10.1.orig/wxPython/src/gtk/_core.py 2009-05-12 23:24:20.000000000 +0200 -+++ wxPython-src-2.8.10.1/wxPython/src/gtk/_core.py 2010-01-16 10:52:45.000000000 +0100 -@@ -6034,10 +6034,6 @@ class ShowEvent(Event): - """GetShow(self) -> bool""" - return _core_.ShowEvent_GetShow(*args, **kwargs) - -- def IsShown(*args, **kwargs): -- """IsShown(self) -> bool""" -- return _core_.ShowEvent_IsShown(*args, **kwargs) -- - Show = property(GetShow,SetShow,doc="See `GetShow` and `SetShow`") - _core_.ShowEvent_swigregister(ShowEvent) - -diff -Nrup wxPython-src-2.8.10.1.orig/wxPython/src/gtk/_core_wrap.cpp wxPython-src-2.8.10.1/wxPython/src/gtk/_core_wrap.cpp ---- wxPython-src-2.8.10.1.orig/wxPython/src/gtk/_core_wrap.cpp 2009-05-12 23:24:20.000000000 +0200 -+++ wxPython-src-2.8.10.1/wxPython/src/gtk/_core_wrap.cpp 2010-01-16 10:53:50.000000000 +0100 -@@ -28673,36 +28673,6 @@ fail: - } - - --SWIGINTERN PyObject *_wrap_ShowEvent_IsShown(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; -- wxShowEvent *arg1 = (wxShowEvent *) 0 ; -- bool result; -- void *argp1 = 0 ; -- int res1 = 0 ; -- PyObject *swig_obj[1] ; -- -- if (!args) SWIG_fail; -- swig_obj[0] = args; -- res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxShowEvent, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShowEvent_IsShown" "', expected argument " "1"" of type '" "wxShowEvent const *""'"); -- } -- arg1 = reinterpret_cast< wxShowEvent * >(argp1); -- { -- PyThreadState* __tstate = wxPyBeginAllowThreads(); -- result = (bool)((wxShowEvent const *)arg1)->IsShown(); -- wxPyEndAllowThreads(__tstate); -- if (PyErr_Occurred()) SWIG_fail; -- } -- { -- resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); -- } -- return resultobj; --fail: -- return NULL; --} -- -- - SWIGINTERN PyObject *ShowEvent_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; -@@ -61296,7 +61266,6 @@ static PyMethodDef SwigMethods[] = { - { (char *)"new_ShowEvent", (PyCFunction) _wrap_new_ShowEvent, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"ShowEvent_SetShow", (PyCFunction) _wrap_ShowEvent_SetShow, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"ShowEvent_GetShow", (PyCFunction)_wrap_ShowEvent_GetShow, METH_O, NULL}, -- { (char *)"ShowEvent_IsShown", (PyCFunction)_wrap_ShowEvent_IsShown, METH_O, NULL}, - { (char *)"ShowEvent_swigregister", ShowEvent_swigregister, METH_VARARGS, NULL}, - { (char *)"ShowEvent_swiginit", ShowEvent_swiginit, METH_VARARGS, NULL}, - { (char *)"new_IconizeEvent", (PyCFunction) _wrap_new_IconizeEvent, METH_VARARGS | METH_KEYWORDS, NULL}, -diff -Nrup wxPython-src-2.8.10.1.orig/wxPython/src/gtk/_gdi.py wxPython-src-2.8.10.1/wxPython/src/gtk/_gdi.py ---- wxPython-src-2.8.10.1.orig/wxPython/src/gtk/_gdi.py 2009-05-12 23:24:20.000000000 +0200 -+++ wxPython-src-2.8.10.1/wxPython/src/gtk/_gdi.py 2010-01-16 10:54:38.000000000 +0100 -@@ -3538,10 +3538,6 @@ class DC(_core.Object): - """ - return _gdi_.DC_SetClippingRect(*args, **kwargs) - -- def SetDeviceClippingRegion(*args, **kwargs): -- """SetDeviceClippingRegion(self, Region region)""" -- return _gdi_.DC_SetDeviceClippingRegion(*args, **kwargs) -- - def DrawLines(*args, **kwargs): - """ - DrawLines(self, List points, int xoffset=0, int yoffset=0) -@@ -5962,11 +5958,6 @@ class GraphicsRenderer(_core.Object): - return _gdi_.GraphicsRenderer_GetDefaultRenderer(*args, **kwargs) - - GetDefaultRenderer = staticmethod(GetDefaultRenderer) -- def GetCairoRenderer(*args, **kwargs): -- """GetCairoRenderer() -> GraphicsRenderer""" -- return _gdi_.GraphicsRenderer_GetCairoRenderer(*args, **kwargs) -- -- GetCairoRenderer = staticmethod(GetCairoRenderer) - def CreateContext(*args): - """ - CreateContext(self, WindowDC dc) -> GraphicsContext -diff -Nrup wxPython-src-2.8.10.1.orig/wxPython/src/gtk/_gdi_wrap.cpp wxPython-src-2.8.10.1/wxPython/src/gtk/_gdi_wrap.cpp ---- wxPython-src-2.8.10.1.orig/wxPython/src/gtk/_gdi_wrap.cpp 2009-05-12 23:24:20.000000000 +0200 -+++ wxPython-src-2.8.10.1/wxPython/src/gtk/_gdi_wrap.cpp 2010-01-16 11:00:47.000000000 +0100 -@@ -4171,12 +4171,6 @@ public : - "wx.GraphicsRenderer is not available on this platform."); - return NULL; - } -- static wxGraphicsRenderer* GetCairoRenderer() { -- PyErr_SetString(PyExc_NotImplementedError, -- "wx.GraphicsRenderer is not available on this platform."); -- return NULL; -- } -- - virtual wxGraphicsContext * CreateContext( const wxWindowDC& ) { return NULL; } - virtual wxGraphicsContext * CreateContextFromNativeContext( void * ) { return NULL; } - virtual wxGraphicsContext * CreateContextFromNativeWindow( void * ) { return NULL; } -@@ -20579,47 +20573,6 @@ fail: - } - - --SWIGINTERN PyObject *_wrap_DC_SetDeviceClippingRegion(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { -- PyObject *resultobj = 0; -- wxDC *arg1 = (wxDC *) 0 ; -- wxRegion *arg2 = 0 ; -- void *argp1 = 0 ; -- int res1 = 0 ; -- void *argp2 = 0 ; -- int res2 = 0 ; -- PyObject * obj0 = 0 ; -- PyObject * obj1 = 0 ; -- char * kwnames[] = { -- (char *) "self",(char *) "region", NULL -- }; -- -- if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:DC_SetDeviceClippingRegion",kwnames,&obj0,&obj1)) SWIG_fail; -- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxDC, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DC_SetDeviceClippingRegion" "', expected argument " "1"" of type '" "wxDC *""'"); -- } -- arg1 = reinterpret_cast< wxDC * >(argp1); -- res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_wxRegion, 0 | 0); -- if (!SWIG_IsOK(res2)) { -- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DC_SetDeviceClippingRegion" "', expected argument " "2"" of type '" "wxRegion const &""'"); -- } -- if (!argp2) { -- SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DC_SetDeviceClippingRegion" "', expected argument " "2"" of type '" "wxRegion const &""'"); -- } -- arg2 = reinterpret_cast< wxRegion * >(argp2); -- { -- PyThreadState* __tstate = wxPyBeginAllowThreads(); -- (arg1)->SetDeviceClippingRegion((wxRegion const &)*arg2); -- wxPyEndAllowThreads(__tstate); -- if (PyErr_Occurred()) SWIG_fail; -- } -- resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- - SWIGINTERN PyObject *_wrap_DC_DrawLines(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxDC *arg1 = (wxDC *) 0 ; -@@ -30753,22 +30706,6 @@ fail: - } - - --SWIGINTERN PyObject *_wrap_GraphicsRenderer_GetCairoRenderer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; -- wxGraphicsRenderer *result = 0 ; -- -- if (!SWIG_Python_UnpackTuple(args,"GraphicsRenderer_GetCairoRenderer",0,0,0)) SWIG_fail; -- { -- result = (wxGraphicsRenderer *)wxGraphicsRenderer::GetCairoRenderer(); -- if (PyErr_Occurred()) SWIG_fail; -- } -- resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxGraphicsRenderer, 0 | 0 ); -- return resultobj; --fail: -- return NULL; --} -- -- - SWIGINTERN PyObject *_wrap_GraphicsRenderer_CreateContext__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - wxGraphicsRenderer *arg1 = (wxGraphicsRenderer *) 0 ; -@@ -40069,7 +40006,6 @@ static PyMethodDef SwigMethods[] = { - { (char *)"DC_SetClippingRegionPointSize", (PyCFunction) _wrap_DC_SetClippingRegionPointSize, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"DC_SetClippingRegionAsRegion", (PyCFunction) _wrap_DC_SetClippingRegionAsRegion, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"DC_SetClippingRect", (PyCFunction) _wrap_DC_SetClippingRect, METH_VARARGS | METH_KEYWORDS, NULL}, -- { (char *)"DC_SetDeviceClippingRegion", (PyCFunction) _wrap_DC_SetDeviceClippingRegion, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"DC_DrawLines", (PyCFunction) _wrap_DC_DrawLines, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"DC_DrawPolygon", (PyCFunction) _wrap_DC_DrawPolygon, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"DC_DrawLabel", (PyCFunction) _wrap_DC_DrawLabel, METH_VARARGS | METH_KEYWORDS, NULL}, -@@ -40341,7 +40277,6 @@ static PyMethodDef SwigMethods[] = { - { (char *)"GraphicsContext_swigregister", GraphicsContext_swigregister, METH_VARARGS, NULL}, - { (char *)"delete_GraphicsRenderer", (PyCFunction)_wrap_delete_GraphicsRenderer, METH_O, NULL}, - { (char *)"GraphicsRenderer_GetDefaultRenderer", (PyCFunction)_wrap_GraphicsRenderer_GetDefaultRenderer, METH_NOARGS, NULL}, -- { (char *)"GraphicsRenderer_GetCairoRenderer", (PyCFunction)_wrap_GraphicsRenderer_GetCairoRenderer, METH_NOARGS, NULL}, - { (char *)"GraphicsRenderer_CreateContext", _wrap_GraphicsRenderer_CreateContext, METH_VARARGS, NULL}, - { (char *)"GraphicsRenderer_CreateMeasuringContext", (PyCFunction)_wrap_GraphicsRenderer_CreateMeasuringContext, METH_O, NULL}, - { (char *)"GraphicsRenderer_CreateContextFromNativeContext", (PyCFunction) _wrap_GraphicsRenderer_CreateContextFromNativeContext, METH_VARARGS | METH_KEYWORDS, NULL}, -diff -Nrup wxPython-src-2.8.10.1.orig/wxPython/src/gtk/xrc.py wxPython-src-2.8.10.1/wxPython/src/gtk/xrc.py ---- wxPython-src-2.8.10.1.orig/wxPython/src/gtk/xrc.py 2009-05-12 23:24:20.000000000 +0200 -+++ wxPython-src-2.8.10.1/wxPython/src/gtk/xrc.py 2010-01-16 11:02:40.000000000 +0100 -@@ -441,18 +441,6 @@ class XmlNode(object): - """SetProperties(self, XmlProperty prop)""" - return _xrc.XmlNode_SetProperties(*args, **kwargs) - -- def GetAttribute(*args, **kwargs): -- """GetAttribute(self, String attrName, String defaultVal) -> String""" -- return _xrc.XmlNode_GetAttribute(*args, **kwargs) -- -- def AddAttribute(*args, **kwargs): -- """AddAttribute(self, String attrName, String value)""" -- return _xrc.XmlNode_AddAttribute(*args, **kwargs) -- -- def GetAttributes(*args, **kwargs): -- """GetAttributes(self) -> XmlProperty""" -- return _xrc.XmlNode_GetAttributes(*args, **kwargs) -- - Children = property(GetChildren,SetChildren,doc="See `GetChildren` and `SetChildren`") - Content = property(GetContent,SetContent,doc="See `GetContent` and `SetContent`") - Name = property(GetName,SetName,doc="See `GetName` and `SetName`") -diff -Nrup wxPython-src-2.8.10.1.orig/wxPython/src/gtk/xrc_wrap.cpp wxPython-src-2.8.10.1/wxPython/src/gtk/xrc_wrap.cpp ---- wxPython-src-2.8.10.1.orig/wxPython/src/gtk/xrc_wrap.cpp 2009-05-12 23:24:20.000000000 +0200 -+++ wxPython-src-2.8.10.1/wxPython/src/gtk/xrc_wrap.cpp 2010-01-16 11:03:14.000000000 +0100 -@@ -6361,163 +6361,6 @@ fail: - } - - --SWIGINTERN PyObject *_wrap_XmlNode_GetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { -- PyObject *resultobj = 0; -- wxXmlNode *arg1 = (wxXmlNode *) 0 ; -- wxString *arg2 = 0 ; -- wxString *arg3 = 0 ; -- wxString result; -- void *argp1 = 0 ; -- int res1 = 0 ; -- bool temp2 = false ; -- bool temp3 = false ; -- PyObject * obj0 = 0 ; -- PyObject * obj1 = 0 ; -- PyObject * obj2 = 0 ; -- char * kwnames[] = { -- (char *) "self",(char *) "attrName",(char *) "defaultVal", NULL -- }; -- -- if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:XmlNode_GetAttribute",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; -- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxXmlNode, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmlNode_GetAttribute" "', expected argument " "1"" of type '" "wxXmlNode const *""'"); -- } -- arg1 = reinterpret_cast< wxXmlNode * >(argp1); -- { -- arg2 = wxString_in_helper(obj1); -- if (arg2 == NULL) SWIG_fail; -- temp2 = true; -- } -- { -- arg3 = wxString_in_helper(obj2); -- if (arg3 == NULL) SWIG_fail; -- temp3 = true; -- } -- { -- PyThreadState* __tstate = wxPyBeginAllowThreads(); -- result = ((wxXmlNode const *)arg1)->GetAttribute((wxString const &)*arg2,(wxString const &)*arg3); -- wxPyEndAllowThreads(__tstate); -- if (PyErr_Occurred()) SWIG_fail; -- } -- { --#if wxUSE_UNICODE -- resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len()); --#else -- resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len()); --#endif -- } -- { -- if (temp2) -- delete arg2; -- } -- { -- if (temp3) -- delete arg3; -- } -- return resultobj; --fail: -- { -- if (temp2) -- delete arg2; -- } -- { -- if (temp3) -- delete arg3; -- } -- return NULL; --} -- -- --SWIGINTERN PyObject *_wrap_XmlNode_AddAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { -- PyObject *resultobj = 0; -- wxXmlNode *arg1 = (wxXmlNode *) 0 ; -- wxString *arg2 = 0 ; -- wxString *arg3 = 0 ; -- void *argp1 = 0 ; -- int res1 = 0 ; -- bool temp2 = false ; -- bool temp3 = false ; -- PyObject * obj0 = 0 ; -- PyObject * obj1 = 0 ; -- PyObject * obj2 = 0 ; -- char * kwnames[] = { -- (char *) "self",(char *) "attrName",(char *) "value", NULL -- }; -- -- if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:XmlNode_AddAttribute",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; -- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxXmlNode, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmlNode_AddAttribute" "', expected argument " "1"" of type '" "wxXmlNode *""'"); -- } -- arg1 = reinterpret_cast< wxXmlNode * >(argp1); -- { -- arg2 = wxString_in_helper(obj1); -- if (arg2 == NULL) SWIG_fail; -- temp2 = true; -- } -- { -- arg3 = wxString_in_helper(obj2); -- if (arg3 == NULL) SWIG_fail; -- temp3 = true; -- } -- { -- PyThreadState* __tstate = wxPyBeginAllowThreads(); -- (arg1)->AddAttribute((wxString const &)*arg2,(wxString const &)*arg3); -- wxPyEndAllowThreads(__tstate); -- if (PyErr_Occurred()) SWIG_fail; -- } -- resultobj = SWIG_Py_Void(); -- { -- if (temp2) -- delete arg2; -- } -- { -- if (temp3) -- delete arg3; -- } -- return resultobj; --fail: -- { -- if (temp2) -- delete arg2; -- } -- { -- if (temp3) -- delete arg3; -- } -- return NULL; --} -- -- --SWIGINTERN PyObject *_wrap_XmlNode_GetAttributes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; -- wxXmlNode *arg1 = (wxXmlNode *) 0 ; -- wxXmlProperty *result = 0 ; -- void *argp1 = 0 ; -- int res1 = 0 ; -- PyObject *swig_obj[1] ; -- -- if (!args) SWIG_fail; -- swig_obj[0] = args; -- res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxXmlNode, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmlNode_GetAttributes" "', expected argument " "1"" of type '" "wxXmlNode const *""'"); -- } -- arg1 = reinterpret_cast< wxXmlNode * >(argp1); -- { -- PyThreadState* __tstate = wxPyBeginAllowThreads(); -- result = (wxXmlProperty *)((wxXmlNode const *)arg1)->GetAttributes(); -- wxPyEndAllowThreads(__tstate); -- if (PyErr_Occurred()) SWIG_fail; -- } -- resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxXmlProperty, 0 | 0 ); -- return resultobj; --fail: -- return NULL; --} -- -- - SWIGINTERN PyObject *XmlNode_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; -@@ -9050,9 +8893,6 @@ static PyMethodDef SwigMethods[] = { - { (char *)"XmlNode_SetNext", (PyCFunction) _wrap_XmlNode_SetNext, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"XmlNode_SetChildren", (PyCFunction) _wrap_XmlNode_SetChildren, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"XmlNode_SetProperties", (PyCFunction) _wrap_XmlNode_SetProperties, METH_VARARGS | METH_KEYWORDS, NULL}, -- { (char *)"XmlNode_GetAttribute", (PyCFunction) _wrap_XmlNode_GetAttribute, METH_VARARGS | METH_KEYWORDS, NULL}, -- { (char *)"XmlNode_AddAttribute", (PyCFunction) _wrap_XmlNode_AddAttribute, METH_VARARGS | METH_KEYWORDS, NULL}, -- { (char *)"XmlNode_GetAttributes", (PyCFunction)_wrap_XmlNode_GetAttributes, METH_O, NULL}, - { (char *)"XmlNode_swigregister", XmlNode_swigregister, METH_VARARGS, NULL}, - { (char *)"XmlNode_swiginit", XmlNode_swiginit, METH_VARARGS, NULL}, - { (char *)"new_XmlDocument", (PyCFunction) _wrap_new_XmlDocument, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython-2.8.10.1-ebmlib.patch b/wxPython-2.8.10.1-ebmlib.patch deleted file mode 100644 index 52b1c97..0000000 --- a/wxPython-2.8.10.1-ebmlib.patch +++ /dev/null @@ -1,1417 +0,0 @@ -diff -Naur wxPython-src-2.8.10.1-orig/wxPython/setup.py wxPython-src-2.8.10.1/wxPython/setup.py ---- wxPython-src-2.8.10.1-orig/wxPython/setup.py 2009-06-06 14:43:00.000000000 -0400 -+++ wxPython-src-2.8.10.1/wxPython/setup.py 2009-06-06 14:43:55.000000000 -0400 -@@ -882,6 +882,7 @@ - 'wx.tools.Editra', - 'wx.tools.Editra.src', - 'wx.tools.Editra.src.autocomp', -+ 'wx.tools.Editra.src.ebmlib', - 'wx.tools.Editra.src.eclib', - 'wx.tools.Editra.src.extern', - 'wx.tools.Editra.src.syntax', -diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/__init__.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/__init__.py ---- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/__init__.py 1969-12-31 19:00:00.000000000 -0500 -+++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/__init__.py 2009-06-06 03:48:10.000000000 -0400 -@@ -0,0 +1,33 @@ -+############################################################################### -+# Name: __init__.py # -+# Purpose: Editra Buisness Model Library # -+# Author: Cody Precord # -+# Copyright: (c) 2009 Cody Precord # -+# Licence: wxWindows Licence # -+############################################################################### -+ -+""" -+Editra Buisness Model Library: -+ -+""" -+ -+__author__ = "Cody Precord " -+__cvsid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" -+__revision__ = "$Revision: 1.1 $" -+ -+#-----------------------------------------------------------------------------# -+ -+# Text Utils -+from searcheng import * -+from fchecker import * -+from fileutil import * -+from fileimpl import * -+ -+from backupmgr import * -+ -+# Storage Classes -+from histcache import * -+from clipboard import * -+ -+# Misc -+from miscutil import * -diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/backupmgr.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/backupmgr.py ---- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/backupmgr.py 1969-12-31 19:00:00.000000000 -0500 -+++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/backupmgr.py 2009-06-06 03:48:10.000000000 -0400 -@@ -0,0 +1,160 @@ -+############################################################################### -+# Name: backupmgr.py # -+# Purpose: File Backup Manager # -+# Author: Cody Precord # -+# Copyright: (c) 2009 Cody Precord # -+# Licence: wxWindows Licence # -+############################################################################### -+ -+""" -+Editra Buisness Model Library: FileBackupMgr -+ -+Helper class for managing and creating backups of files. -+ -+""" -+ -+__author__ = "Cody Precord " -+__cvsid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" -+__revision__ = "$Revision: 1.1 $" -+ -+__all__ = [ 'FileBackupMgr', ] -+ -+#-----------------------------------------------------------------------------# -+# Imports -+import os -+import shutil -+ -+# Local Imports -+import fileutil -+import fchecker -+ -+#-----------------------------------------------------------------------------# -+ -+class FileBackupMgr(object): -+ """File backup creator and manager""" -+ def __init__(self, header=None, template=u"%s~"): -+ """Create a BackupManager -+ @keyword header: header to id backups with (Text files only!!) -+ @keyword template: template string for naming backup file with -+ -+ """ -+ object.__init__(self) -+ -+ # Attributes -+ self.checker = fchecker.FileTypeChecker() -+ self.header = header # Backup id header -+ self.template = template # Filename template -+ -+ def _CheckHeader(self, fname): -+ """Check if the backup file has a header that matches the -+ header used to identify backup files. -+ @param fname: name of file to check -+ @return: bool (True if header is ok, False otherwise) -+ -+ """ -+ isok = False -+ try: -+ handle = open(fname) -+ line = handle.readline() -+ isok = line.startswith(self.header) -+ except: -+ isok = False -+ finally: -+ handle.close() -+ return isok -+ -+ def GetBackupFilename(self, fname): -+ """Get the unique name for the files backup copy -+ @param fname: string (file path) -+ @return: string -+ -+ """ -+ rname = self.template % fname -+ if self.header is not None and \ -+ not self.checker.IsBinary(fname) and \ -+ os.path.exists(rname): -+ # Make sure that the template backup name does not match -+ # an existing file that is not a backup file. -+ while not self._CheckHeader(rname): -+ rname = self.template % rname -+ -+ return rname -+ -+ def GetBackupWriter(self, fileobj): -+ """Create a backup filewriter method to backup a files contents -+ with. -+ @param fileobj: object implementing fileimpl.FileObjectImpl interface -+ @return: callable(text) to create backup with -+ -+ """ -+ nfile = fileobj.Clone() -+ fname = self.GetBackupFilename(nfile.GetPath()) -+ nfile.SetPath(fname) -+ # Write the header if it is enabled -+ if self.header is not None and not self.checker.IsBinary(fname): -+ nfile.Write(self.header + os.linesep) -+ return nfile.Write -+ -+ def HasBackup(self, fname): -+ """Check if a given file has a backup file available or not -+ @param fname: string (file path) -+ -+ """ -+ backup = self.GetBackupFilename(fname) -+ return os.path.exists(backup) -+ -+ def IsBackupNewer(self, fname): -+ """Is the backup of this file newer than the saved version -+ of the file? -+ @param fname: string (file path) -+ @return: bool -+ -+ """ -+ backup = self.GetBackupFilename(fname) -+ if os.path.exists(fname) and os.path.exists(backup): -+ mod1 = fileutil.GetFileModTime(backup) -+ mod2 = fileutil.GetFileModTime(fname) -+ return mod1 > mod2 -+ else: -+ return False -+ -+ def MakeBackupCopy(self, fname): -+ """Create a backup copy of the given filename -+ @param fname: string (file path) -+ @return: bool (True == Success) -+ -+ """ -+ backup = self.GetBackupFilename(fname) -+ try: -+ if os.path.exists(backup): -+ os.remove(backup) -+ -+ shutil.copy2(fname, backup) -+ except: -+ return False -+ else: -+ return True -+ -+ def MakeBackupCopyAsync(self, fname): -+ """Do the backup asyncronously -+ @param fname: string (file path) -+ @todo: Not implemented yet -+ -+ """ -+ raise NotImplementedError("TODO: implement once threadpool is finished") -+ -+ def SetBackupFileTemplate(self, tstr): -+ """Set the filename template for generating the backupfile name -+ @param tstr: template string i.e) %s~ -+ -+ """ -+ assert tstr.count("%s") == 1, "Format statment must only have one arg" -+ self.template = tstr -+ -+ def SetHeader(self, header): -+ """Set the header string for identifying a file as a backup -+ @param header: string (single line only) -+ -+ """ -+ assert '\n' not in header, "Header must only be a single line" -+ self.header = header -diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/clipboard.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/clipboard.py ---- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/clipboard.py 1969-12-31 19:00:00.000000000 -0500 -+++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/clipboard.py 2009-06-06 03:48:10.000000000 -0400 -@@ -0,0 +1,135 @@ -+############################################################################### -+# Name: histcache.py # -+# Purpose: History Cache # -+# Author: Cody Precord # -+# Copyright: (c) 2009 Cody Precord # -+# Licence: wxWindows Licence # -+############################################################################### -+ -+""" -+Editra Buisness Model Library: Clipboard -+ -+Clipboard helper class -+ -+""" -+ -+__author__ = "Hasan Aljudy" -+__cvsid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" -+__revision__ = "$Revision: 1.1 $" -+ -+__all__ = [ 'Clipboard',] -+ -+#-----------------------------------------------------------------------------# -+# Imports -+import wx -+ -+#-----------------------------------------------------------------------------# -+ -+class Clipboard(object): -+ """Multiple clipboards as named registers (as per vim) -+ -+ " is an alias for system clipboard and is also the default clipboard. -+ -+ @note: The only way to access multiple clipboards right now is through -+ Normal mode when Vi(m) emulation is enabled. -+ -+ """ -+ NAMES = list(u'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_') -+ registers = {} -+ current = u'"' -+ -+ @classmethod -+ def Switch(cls, reg): -+ """Switch to register -+ @param reg: char -+ -+ """ -+ if reg in cls.NAMES or reg == u'"': -+ cls.current = reg -+ else: -+ raise Exception(u"Switched to invalid register name") -+ -+ @classmethod -+ def NextFree(cls, reg): -+ """Switch to the next free register. If current register is free, no -+ switching happens. -+ -+ A free register is one that's either unused or has no content -+ -+ @param reg: char -+ @note: This is not used yet. -+ -+ """ -+ if cls.Get() == u'': -+ return -+ -+ for name in cls.NAMES: -+ if cls.registers.get(name, u'') == u'': -+ cls.Switch(name) -+ break -+ -+ @classmethod -+ def AllUsed(cls): -+ """Get a dictionary mapping all used clipboards (plus the system -+ clipboard) to their content. -+ -+ @note: This is not used yet. -+ -+ """ -+ cmd_map = { u'"': cls.SystemGet() } -+ for name in cls.NAMES: -+ if cls.registers.get(name, u''): -+ cmd_map[name] = cls.registers[name] -+ return cmd_map -+ -+ @classmethod -+ def Get(cls): -+ """Get the content of the current register. Used for pasting""" -+ if cls.current == u'"': -+ return cls.SystemGet() -+ else: -+ return cls.registers.get( cls.current, u'' ) -+ -+ @classmethod -+ def Set(cls, text): -+ """Set the content of the current register -+ @param text: string -+ -+ """ -+ if cls.current == u'"': -+ return cls.SystemSet(text) -+ else: -+ cls.registers[cls.current] = text -+ -+ @classmethod -+ def SystemGet(cls): -+ """Get text from the system clipboard -+ @return: string -+ -+ """ -+ text = None -+ if wx.TheClipboard.Open(): -+ if wx.TheClipboard.IsSupported(wx.DataFormat(wx.DF_TEXT)): -+ text = wx.TextDataObject() -+ wx.TheClipboard.GetData(text) -+ -+ wx.TheClipboard.Close() -+ -+ if text is not None: -+ return text.GetText() -+ else: -+ return u'' -+ -+ @classmethod -+ def SystemSet(cls, text): -+ """Set text into the system clipboard -+ @param text: string -+ @return: bool -+ -+ """ -+ ok = False -+ if wx.TheClipboard.Open(): -+ wx.TheClipboard.SetData(wx.TextDataObject(text)) -+ wx.TheClipboard.Close() -+ ok = True -+ return ok -\ No newline at end of file -diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/fchecker.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/fchecker.py ---- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/fchecker.py 1969-12-31 19:00:00.000000000 -0500 -+++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/fchecker.py 2009-06-06 03:48:10.000000000 -0400 -@@ -0,0 +1,82 @@ -+############################################################################### -+# Name: fchecker.py # -+# Purpose: Filetype checker object. # -+# Author: Cody Precord # -+# Copyright: (c) 2009 Cody Precord # -+# Licence: wxWindows Licence # -+############################################################################### -+ -+""" -+Editra Buisness Model Library: FileTypeChecker -+ -+Helper class for checking what kind of a content a file contains. -+ -+""" -+ -+__author__ = "Cody Precord " -+__cvsid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" -+__revision__ = "$Revision: 1.1 $" -+ -+__all__ = [ 'FileTypeChecker', ] -+ -+#-----------------------------------------------------------------------------# -+# Imports -+import os -+ -+#-----------------------------------------------------------------------------# -+ -+class FileTypeChecker(object): -+ """File type checker and recognizer""" -+ TXTCHARS = ''.join(map(chr, [7, 8, 9, 10, 12, 13, 27] + range(0x20, 0x100))) -+ ALLBYTES = ''.join(map(chr, range(256))) -+ -+ def __init__(self, preread=4096): -+ """Create the FileTypeChecker -+ @keyword preread: number of bytes to read for checking file type -+ -+ """ -+ object.__init__(self) -+ -+ # Attributes -+ self._preread = preread -+ -+ @staticmethod -+ def _GetHandle(fname): -+ """Get a file handle for reading -+ @param fname: filename -+ @return: file object or None -+ -+ """ -+ try: -+ handle = open(fname, 'rb') -+ except: -+ handle = None -+ return handle -+ -+ def IsBinary(self, fname): -+ """Is the file made up of binary data -+ @param fname: filename to check -+ @return: bool -+ -+ """ -+ handle = self._GetHandle(fname) -+ if handle is not None: -+ bytes = handle.read(self._preread) -+ handle.close() -+ nontext = bytes.translate(FileTypeChecker.ALLBYTES, -+ FileTypeChecker.TXTCHARS) -+ return bool(nontext) -+ else: -+ return False -+ -+ def IsReadableText(self, fname): -+ """Is the given path readable as text. Will return True if the -+ file is accessable by current user and is plain text. -+ @param fname: filename -+ @return: bool -+ -+ """ -+ f_ok = False -+ if os.access(fname, os.R_OK): -+ f_ok = not self.IsBinary(fname) -+ return f_ok -diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/fileimpl.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/fileimpl.py ---- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/fileimpl.py 1969-12-31 19:00:00.000000000 -0500 -+++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/fileimpl.py 2009-06-06 03:48:10.000000000 -0400 -@@ -0,0 +1,215 @@ -+############################################################################### -+# Name: Cody Precord # -+# Purpose: File Object Interface Implementation # -+# Author: Cody Precord # -+# Copyright: (c) 2009 Cody Precord # -+# License: wxWindows License # -+############################################################################### -+ -+""" -+Editra Buisness Model Library: FileObjectImpl -+ -+Implementation of a file object interface class. Objects and methods inside -+of this library expect a file object that derives from this interface. -+ -+""" -+ -+__author__ = "Cody Precord " -+__svnid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" -+__revision__ = "$Revision: 1.1 $" -+ -+#--------------------------------------------------------------------------# -+# Imports -+import os -+ -+# Editra Buisness Model Imports -+import fileutil -+ -+#--------------------------------------------------------------------------# -+ -+class FileObjectImpl(object): -+ """File Object Interface implementation base class""" -+ def __init__(self, path=u'', modtime=0): -+ object.__init__(self) -+ -+ # Attributes -+ self._path = path -+ self._modtime = modtime -+ -+ self._handle = None -+ self.open = False -+ -+ self.last_err = None -+ -+ def ClearLastError(self): -+ """Reset the error marker on this file""" -+ del self.last_err -+ self.last_err = None -+ -+ def Clone(self): -+ """Clone the file object -+ @return: FileObject -+ -+ """ -+ fileobj = FileObjectImpl(self._path, self._modtime) -+ fileobj.SetLastError(self.last_err) -+ return fileobj -+ -+ def Close(self): -+ """Close the file handle -+ @note: this is normally done automatically after a read/write operation -+ -+ """ -+ try: -+ self._handle.close() -+ except: -+ pass -+ -+ self.open = False -+ -+ def DoOpen(self, mode): -+ """Opens and creates the internal file object -+ @param mode: mode to open file in -+ @return: True if opened, False if not -+ @postcondition: self._handle is set to the open handle -+ -+ """ -+ if not len(self._path): -+ return False -+ -+ try: -+ file_h = open(self._path, mode) -+ except (IOError, OSError), msg: -+ self.last_err = msg -+ return False -+ else: -+ self._handle = file_h -+ self.open = True -+ return True -+ -+ def GetExtension(self): -+ """Get the files extension if it has one else simply return the -+ filename minus the path. -+ @return: string file extension (no dot) -+ -+ """ -+ fname = os.path.split(self._path) -+ return fname[-1].split(os.extsep)[-1].lower() -+ -+ def GetHandle(self): -+ """Get this files handle""" -+ return self._handle -+ -+ def GetLastError(self): -+ """Return the last error that occured when using this file -+ @return: err traceback or None -+ -+ """ -+ return unicode(self.last_err).replace("u'", "'") -+ -+ def GetModtime(self): -+ """Get the timestamp of this files last modification""" -+ return self._modtime -+ -+ def GetPath(self): -+ """Get the path of the file -+ @return: string -+ -+ """ -+ return self._path -+ -+ def GetSize(self): -+ """Get the size of the file -+ @return: int -+ -+ """ -+ if self._path: -+ return fileutil.GetFileSize(self._path) -+ else: -+ return 0 -+ -+ @property -+ def Handle(self): -+ """Raw file handle property""" -+ return self._handle -+ -+ def IsOpen(self): -+ """Check if file is open or not -+ @return: bool -+ -+ """ -+ return self.open -+ -+ def IsReadOnly(self): -+ """Is the file Read Only -+ @return: bool -+ -+ """ -+ if os.path.exists(self._path): -+ return not os.access(self._path, os.R_OK|os.W_OK) -+ else: -+ return False -+ -+ @property -+ def Modtime(self): -+ """File modification time propery""" -+ return self.GetModtime() -+ -+ @property -+ def ReadOnly(self): -+ """Is the file read only?""" -+ return self.IsReadOnly() -+ -+ def ResetAll(self): -+ """Reset all file attributes""" -+ self._handle = None -+ self.open = False -+ self._path = u'' -+ self._modtime = 0 -+ self.last_err = None -+ -+ def SetLastError(self, err): -+ """Set the last error -+ @param err: exception object / msg -+ -+ """ -+ self.last_err = err -+ -+ def SetPath(self, path): -+ """Set the path of the file -+ @param path: absolute path to file -+ -+ """ -+ self._path = path -+ -+ def SetModTime(self, mtime): -+ """Set the modtime of this file -+ @param mtime: long int to set modtime to -+ -+ """ -+ self._modtime = mtime -+ -+ #--- SHould be overridden by subclass ---# -+ -+ def Read(self): -+ """Open/Read the file -+ @return: string (file contents) -+ -+ """ -+ txt = u'' -+ if self.DoOpen('rb'): -+ try: -+ txt = self._handle.read() -+ except: -+ pass -+ -+ return txt -+ -+ def Write(self, value): -+ """Open/Write the value to disk -+ @param value: string -+ -+ """ -+ if self.DoOpen('wb'): -+ self._handle.write(value) -+ self._handle.close() -diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/fileutil.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/fileutil.py ---- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/fileutil.py 1969-12-31 19:00:00.000000000 -0500 -+++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/fileutil.py 2009-06-06 03:48:10.000000000 -0400 -@@ -0,0 +1,180 @@ -+############################################################################### -+# Name: fileutil.py # -+# Purpose: File Management Utilities. # -+# Author: Cody Precord # -+# Copyright: (c) 2009 Cody Precord # -+# Licence: wxWindows Licence # -+############################################################################### -+ -+""" -+Editra Buisness Model Library: File Utilities -+ -+Utility functions for managing and working with files. -+ -+""" -+ -+__author__ = "Cody Precord " -+__svnid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" -+__revision__ = "$Revision: 1.1 $" -+ -+__all__ = [ 'GetFileModTime', 'GetFileSize', 'GetUniqueName', 'MakeNewFile', -+ 'MakeNewFolder', 'GetFileExtension', 'GetFileName', 'GetPathName', -+ 'ResolveRealPath', 'IsLink' ] -+ -+#-----------------------------------------------------------------------------# -+# Imports -+import os -+import platform -+import stat -+ -+UNIX = WIN = False -+if platform.system().lower() in ['windows', 'microsoft']: -+ WIN = True -+ try: -+ # Check for if win32 extensions are available -+ import win32com.client as win32client -+ except ImportError: -+ win32client = None -+else: -+ UNIX = True -+ -+#-----------------------------------------------------------------------------# -+ -+def GetFileExtension(file_str): -+ """Gets last atom at end of string as extension if -+ no extension whole string is returned -+ @param file_str: path or file name to get extension from -+ -+ """ -+ return file_str.split('.')[-1] -+ -+def GetFileModTime(file_name): -+ """Returns the time that the given file was last modified on -+ @param file_name: path of file to get mtime of -+ -+ """ -+ try: -+ mod_time = os.path.getmtime(file_name) -+ except (OSError, EnvironmentError): -+ mod_time = 0 -+ return mod_time -+ -+def GetFileName(path): -+ """Gets last atom on end of string as filename -+ @param path: full path to get filename from -+ -+ """ -+ return os.path.split(path)[-1] -+ -+def GetFileSize(path): -+ """Get the size of the file at a given path -+ @param path: Path to file -+ @return: long -+ -+ """ -+ try: -+ return os.stat(path)[stat.ST_SIZE] -+ except: -+ return 0 -+ -+def GetPathName(path): -+ """Gets the path minus filename -+ @param path: full path to get base of -+ -+ """ -+ return os.path.split(path)[0] -+ -+def IsLink(path): -+ """Is the file a link -+ @return: bool -+ -+ """ -+ if WIN: -+ return path.endswith(".lnk") or os.path.islink(path) -+ else: -+ return os.path.islink(path) -+ -+def ResolveRealPath(link): -+ """Return the real path of the link file -+ @param link: path of link file -+ @return: string -+ -+ """ -+ assert IsLink(link), "ResolveRealPath expects a link file!" -+ realpath = link -+ if WIN and win32client is not None: -+ shell = win32client.Dispatch("WScript.Shell") -+ shortcut = shell.CreateShortCut(link) -+ realpath = shortcut.Targetpath -+ else: -+ realpath = os.path.realpath(link) -+ return realpath -+ -+#-----------------------------------------------------------------------------# -+ -+def GetUniqueName(path, name): -+ """Make a file name that will be unique in case a file of the -+ same name already exists at that path. -+ @param path: Root path to folder of files destination -+ @param name: desired file name base -+ @return: string -+ -+ """ -+ tmpname = os.path.join(path, name) -+ if os.path.exists(tmpname): -+ if '.' not in name: -+ ext = '' -+ fbase = name -+ else: -+ ext = '.' + name.split('.')[-1] -+ fbase = name[:-1 * len(ext)] -+ -+ inc = len([x for x in os.listdir(path) if x.startswith(fbase)]) -+ tmpname = os.path.join(path, "%s-%d%s" % (fbase, inc, ext)) -+ while os.path.exists(tmpname): -+ inc = inc + 1 -+ tmpname = os.path.join(path, "%s-%d%s" % (fbase, inc, ext)) -+ -+ return tmpname -+ -+ -+#-----------------------------------------------------------------------------# -+ -+def MakeNewFile(path, name): -+ """Make a new file at the given path with the given name. -+ If the file already exists, the given name will be changed to -+ a unique name in the form of name + -NUMBER + .extension -+ @param path: path to directory to create file in -+ @param name: desired name of file -+ @return: Tuple of (success?, Path of new file OR Error message) -+ -+ """ -+ if not os.path.isdir(path): -+ path = os.path.dirname(path) -+ fname = GetUniqueName(path, name) -+ -+ try: -+ open(fname, 'w').close() -+ except (IOError, OSError), msg: -+ return (False, str(msg)) -+ -+ return (True, fname) -+ -+def MakeNewFolder(path, name): -+ """Make a new folder at the given path with the given name. -+ If the folder already exists, the given name will be changed to -+ a unique name in the form of name + -NUMBER. -+ @param path: path to create folder on -+ @param name: desired name for folder -+ @return: Tuple of (success?, new dirname OR Error message) -+ -+ """ -+ if not os.path.isdir(path): -+ path = os.path.dirname(path) -+ folder = GetUniqueName(path, name) -+ try: -+ os.mkdir(folder) -+ except (OSError, IOError), msg: -+ return (False, str(msg)) -+ -+ return (True, folder) -diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/histcache.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/histcache.py ---- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/histcache.py 1969-12-31 19:00:00.000000000 -0500 -+++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/histcache.py 2009-06-06 03:48:10.000000000 -0400 -@@ -0,0 +1,131 @@ -+############################################################################### -+# Name: histcache.py # -+# Purpose: History Cache # -+# Author: Cody Precord # -+# Copyright: (c) 2009 Cody Precord # -+# Licence: wxWindows Licence # -+############################################################################### -+ -+""" -+Editra Buisness Model Library: HistoryCache -+ -+History cache that acts as a stack for managing a history list o -+ -+""" -+ -+__author__ = "Cody Precord " -+__cvsid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" -+__revision__ = "$Revision: 1.1 $" -+ -+__all__ = [ 'HistoryCache', 'HIST_CACHE_UNLIMITED'] -+ -+#-----------------------------------------------------------------------------# -+# Imports -+ -+#-----------------------------------------------------------------------------# -+# Globals -+HIST_CACHE_UNLIMITED = -1 -+ -+#-----------------------------------------------------------------------------# -+ -+class HistoryCache(object): -+ def __init__(self, max_size=HIST_CACHE_UNLIMITED): -+ object.__init__(self) -+ -+ # Attributes -+ self._list = list() -+ self.cpos = -1 -+ self.max_size = max_size -+ -+ def _Resize(self): -+ """Adjust cache size based on max size setting""" -+ if self.max_size != HIST_CACHE_UNLIMITED: -+ lsize = len(self._list) -+ if lsize: -+ adj = self.max_size - lsize -+ if adj < 0: -+ self._list.pop(0) -+ self.cpos = len(self._list) - 1 -+ -+ def Clear(self): -+ """Clear the history cache""" -+ del self._list -+ self._list = list() -+ self.cpos = -1 -+ -+ def GetSize(self): -+ """Get the current size of the cache -+ @return: int (number of items in the cache) -+ -+ """ -+ return len(self._list) -+ -+ def GetMaxSize(self): -+ """Get the max size of the cache -+ @return: int -+ -+ """ -+ return self.max_size -+ -+ def GetNextItem(self): -+ """Get the next item in the history cache, moving the -+ current postion towards the end of the cache. -+ @return: object or None if at end of list -+ -+ """ -+ item = None -+ if self.cpos < len(self._list) - 1: -+ self.cpos += 1 -+ item = self._list[self.cpos] -+ return item -+ -+ def GetPreviousItem(self): -+ """Get the previous item in the history cache, moving the -+ current postion towards the begining of the cache. -+ @return: object or None if at start of list -+ -+ """ -+ item = None -+ if self.cpos >= 0: -+ item = self._list[self.cpos] -+ self.cpos -= 1 -+ return item -+ -+ def HasPrevious(self): -+ """Are there more items to the left of the current position -+ @return: bool -+ -+ """ -+ more = self.cpos >= 0 -+ return more -+ -+ def HasNext(self): -+ """Are there more items to the right of the current position -+ @return: bool -+ -+ """ -+ if self.cpos == -1 and len(self._list): -+ more = True -+ else: -+ more = self.cpos >= 0 and self.cpos < len(self._list) -+ return more -+ -+ def PutItem(self, item): -+ """Put an item on the top of the cache -+ @param item: object -+ -+ """ -+ if self.cpos != len(self._list) - 1: -+ self._list = self._list[:self.cpos] -+ self._list.append(item) -+ self.cpos += 1 -+ self._Resize() -+ -+ def SetMaxSize(self, max_size): -+ """Set the maximum size of the cache -+ @param max_size: int (HIST_CACHE_UNLIMITED for unlimited size) -+ -+ """ -+ assert max_size > 0 or max_size == 1, "Invalid max size" -+ self.max_size = max_size -+ self._Resize() -diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/miscutil.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/miscutil.py ---- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/miscutil.py 1969-12-31 19:00:00.000000000 -0500 -+++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/miscutil.py 2009-06-06 03:48:10.000000000 -0400 -@@ -0,0 +1,33 @@ -+############################################################################### -+# Name: miscutil.py # -+# Purpose: Various helper functions. # -+# Author: Cody Precord # -+# Copyright: (c) 2009 Cody Precord # -+# Licence: wxWindows Licence # -+############################################################################### -+ -+""" -+Editra Buisness Model Library: MiscUtil -+ -+Various helper functions -+ -+""" -+ -+__author__ = "Cody Precord " -+__cvsid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" -+__revision__ = "$Revision: 1.1 $" -+ -+__all__ = [ 'MinMax', ] -+ -+#-----------------------------------------------------------------------------# -+# Imports -+ -+#-----------------------------------------------------------------------------# -+ -+def MinMax(arg1, arg2): -+ """Return an ordered tuple of the minumum and maximum value -+ of the two args. -+ @return: tuple -+ -+ """ -+ return min(arg1, arg2), max(arg1, arg2) -diff -Naur wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/searcheng.py wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/searcheng.py ---- wxPython-src-2.8.10.1-orig/wxPython/wx/tools/Editra/src/ebmlib/searcheng.py 1969-12-31 19:00:00.000000000 -0500 -+++ wxPython-src-2.8.10.1/wxPython/wx/tools/Editra/src/ebmlib/searcheng.py 2009-06-06 03:48:10.000000000 -0400 -@@ -0,0 +1,400 @@ -+############################################################################### -+# Name: searcheng.py # -+# Purpose: Text search engine and utilities # -+# Author: Cody Precord # -+# Copyright: (c) 2009 Cody Precord # -+# Licence: wxWindows Licence # -+############################################################################### -+ -+""" -+Editra Buisness Model Library: SearchEngine -+ -+Text Search Engine for finding text and grepping files -+ -+""" -+ -+__author__ = "Cody Precord " -+__cvsid__ = "$Id: wxPython-2.8.10.1-ebmlib.patch,v 1.1 2010/03/17 11:12:17 sharkcz Exp $" -+__revision__ = "$Revision: 1.1 $" -+ -+__all__ = [ 'SearchEngine', ] -+ -+#-----------------------------------------------------------------------------# -+# Imports -+import os -+import re -+import fnmatch -+import types -+from StringIO import StringIO -+ -+# Local imports -+import fchecker -+ -+#-----------------------------------------------------------------------------# -+ -+class SearchEngine(object): -+ """Text Search Engine -+ All Search* methods are iterable generators -+ All Find* methods do a complete search and return the match collection -+ @summary: Text Search Engine -+ @todo: Add file filter support -+ -+ """ -+ def __init__(self, query, regex=True, down=True, -+ matchcase=True, wholeword=False): -+ """Initialize a search engine object -+ @param query: search string -+ @keyword regex: Is a regex search -+ @keyword down: Search down or up -+ @keyword matchcase: Match case -+ @keyword wholeword: Match whole word -+ -+ """ -+ object.__init__(self) -+ -+ # Attributes -+ self._isregex = regex -+ self._next = down -+ self._matchcase = matchcase -+ self._wholeword = wholeword -+ self._unicode = False -+ self._query = query -+ self._regex = u'' -+ self._pool = u'' -+ self._lmatch = None # Last match object -+ self._filters = None # File Filters -+ self._formatter = lambda f, l, m: u"%s %d: %s" % (f, l+1, m) -+ self._CompileRegex() -+ -+ def _CompileRegex(self): -+ """Prepare and compile the regex object based on the current state -+ and settings of the engine. -+ @postcondition: the engines regular expression is created -+ -+ """ -+ tmp = self._query -+ if not self._isregex: -+ tmp = re.escape(tmp) -+ -+ if self._wholeword: -+ tmp = "\\b%s\\b" % tmp -+ -+ flags = re.MULTILINE -+ -+ if not self._matchcase: -+ flags |= re.IGNORECASE -+ -+ if self._unicode: -+ flags |= re.UNICODE -+ -+ try: -+ self._regex = re.compile(tmp, flags) -+ except: -+ self._regex = None -+ -+ def ClearPool(self): -+ """Clear the search pool""" -+ del self._pool -+ self._pool = u"" -+ -+ def Find(self, spos=0): -+ """Find the next match based on the state of the search engine -+ @keyword spos: search start position -+ @return: tuple (match start pos, match end pos) or None if no match -+ @note: L{SetSearchPool} has been called to set search string -+ -+ """ -+ if self._regex is None: -+ return None -+ -+ if self._next: -+ return self.FindNext(spos) -+ else: -+ if spos == 0: -+ spos = -1 -+ return self.FindPrev(spos) -+ -+ def FindAll(self): -+ """Find all the matches in the current context -+ @return: list of tuples [(start1, end1), (start2, end2), ] -+ -+ """ -+ if self._regex is None: -+ return list() -+ -+ matches = [match for match in self._regex.finditer(self._pool)] -+ return matches -+ -+ def FindAllLines(self): -+ """Find all the matches in the current context -+ @return: list of strings -+ -+ """ -+ rlist = list() -+ if self._regex is None: -+ return rlist -+ -+ for lnum, line in enumerate(StringIO(self._pool)): -+ if self._regex.search(line) is not None: -+ rlist.append(self._formatter(u"Untitled", lnum, line)) -+ -+ return rlist -+ -+ def FindNext(self, spos=0): -+ """Find the next match of the query starting at spos -+ @keyword spos: search start position in string -+ @return: tuple (match start pos, match end pos) or None if no match -+ @note: L{SetSearchPool} has been called to set the string to search in. -+ -+ """ -+ if self._regex is None: -+ return None -+ -+ if spos < len(self._pool): -+ match = self._regex.search(self._pool[spos:]) -+ if match is not None: -+ self._lmatch = match -+ return match.span() -+ return None -+ -+ def FindPrev(self, spos=-1): -+ """Find the previous match of the query starting at spos -+ @keyword spos: search start position in string -+ @return: tuple (match start pos, match end pos) -+ -+ """ -+ if self._regex is None: -+ return None -+ -+ if spos+1 < len(self._pool): -+ matches = [match for match in -+ self._regex.finditer(self._pool[:spos])] -+ if len(matches): -+ lmatch = matches[-1] -+ self._lmatch = lmatch -+ return (lmatch.start(), lmatch.end()) -+ return None -+ -+ def GetLastMatch(self): -+ """Get the last found match object from the previous L{FindNext} or -+ L{FindPrev} action. -+ @return: match object or None -+ -+ """ -+ return self._lmatch -+ -+ def GetOptionsString(self): -+ """Get a string describing the search engines options""" -+ rstring = u"\"%s\" [ " % self._query -+ for desc, attr in (("regex: %s", self._isregex), -+ ("match case: %s", self._matchcase), -+ ("whole word: %s", self._wholeword)): -+ if attr: -+ rstring += (desc % u"on; ") -+ else: -+ rstring += (desc % u"off; ") -+ rstring += u"]" -+ -+ return rstring -+ -+ def GetQuery(self): -+ """Get the raw query string used by the search engine -+ @return: string -+ -+ """ -+ return self._query -+ -+ def GetQueryObject(self): -+ """Get the regex object used for the search. Will return None if -+ there was an error in creating the object. -+ @return: pattern object -+ -+ """ -+ return self._regex -+ -+ def GetSearchPool(self): -+ """Get the search pool string for this L{SearchEngine}. -+ @return: string -+ -+ """ -+ return self._pool -+ -+ def IsMatchCase(self): -+ """Is the engine set to a case sensitive search -+ @return: bool -+ -+ """ -+ return self._matchcase -+ -+ def IsRegEx(self): -+ """Is the engine searching with the query as a regular expression -+ @return: bool -+ -+ """ -+ return self._isregex -+ -+ def IsWholeWord(self): -+ """Is the engine set to search for wholeword matches -+ @return: bool -+ -+ """ -+ return self._wholeword -+ -+ def SearchInBuffer(self, sbuffer): -+ """Search in the buffer -+ @param sbuffer: buffer like object -+ @todo: implement -+ -+ """ -+ raise NotImplementedError -+ -+ def SearchInDirectory(self, directory, recursive=True): -+ """Search in all the files found in the given directory -+ @param directory: directory path -+ @keyword recursive: search recursivly -+ -+ """ -+ if self._regex is None: -+ return -+ -+ # Get all files in the directories -+ paths = [os.path.join(directory, fname) -+ for fname in os.listdir(directory) if not fname.startswith('.')] -+ -+ # Filter out files that don't match the current filter(s) -+ if self._filters is not None and len(self._filters): -+ filtered = list() -+ for fname in paths: -+ if os.path.isdir(fname): -+ filtered.append(fname) -+ continue -+ -+ for pat in self._filters: -+ if fnmatch.fnmatch(fname, pat): -+ filtered.append(fname) -+ paths = filtered -+ -+ # Begin searching in the paths -+ for path in paths: -+ if recursive and os.path.isdir(path): -+ # Recursive call to decend into directories -+ for match in self.SearchInDirectory(path, recursive): -+ yield match -+ else: -+ for match in self.SearchInFile(path): -+ yield match -+ return -+ -+ def SearchInFile(self, fname): -+ """Search in a file for all lines with matches of the set query and -+ yield the results as they are found. -+ @param fname: filename -+ @todo: unicode handling -+ -+ """ -+ if self._regex is None: -+ return -+ -+ checker = fchecker.FileTypeChecker() -+ if checker.IsReadableText(fname): -+ try: -+ fobj = open(fname, 'rb') -+ except (IOError, OSError): -+ return -+ else: -+ # Special token to signify start of a search -+ yield (None, fname) -+ -+ for lnum, line in enumerate(fobj): -+ if self._regex.search(line) is not None: -+ yield self._formatter(fname, lnum, line) -+ fobj.close() -+ return -+ -+ def SearchInFiles(self, flist): -+ """Search in a list of files and yield results as they are found. -+ @param flist: list of file names -+ -+ """ -+ if self._regex is None: -+ return -+ -+ for fname in flist: -+ for match in self.SearchInFile(fname): -+ yield match -+ return -+ -+ def SearchInString(self, sstring, startpos=0): -+ """Search in a string -+ @param sstring: string to search in -+ @keyword startpos: search start position -+ -+ """ -+ raise NotImplementedError -+ -+ def SetFileFilters(self, filters): -+ """Set the file filters to specify what type of files to search in -+ the filter should be a list of wild card patterns to match. -+ @param filters: list of strings ['*.py', '*.pyw'] -+ -+ """ -+ self._filters = filters -+ -+ def SetFlags(self, isregex=None, matchcase=None, wholeword=None, down=None): -+ """Set the search engine flags. Leaving the parameter set to None -+ will not change the flag. Setting it to non None will change the value. -+ @keyword isregex: is regex search -+ @keyword matchcase: matchcase search -+ @keyword wholeword: wholeword search -+ @keyword down: search down or up -+ -+ """ -+ for attr, val in (('_isregex', isregex), ('_matchcase', matchcase), -+ ('_wholeword', wholeword), ('_next', down)): -+ if val is not None: -+ setattr(self, attr, val) -+ self._CompileRegex() -+ -+ def SetMatchCase(self, case=True): -+ """Set whether the engine will use case sensative searches -+ @keyword case: bool -+ -+ """ -+ self._matchcase = case -+ self._CompileRegex() -+ -+ def SetResultFormatter(self, funct): -+ """Set the result formatter function -+ @param funct: callable(filename, linenum, matchstr) -+ -+ """ -+ assert callable(funct) -+ self._formatter = funct -+ -+ def SetSearchPool(self, pool): -+ """Set the search pool used by the Find methods -+ @param pool: string to search in -+ -+ """ -+ del self._pool -+ self._pool = pool -+ if isinstance(self._pool, types.UnicodeType): -+ self._unicode = True -+ self._CompileRegex() -+ -+ def SetQuery(self, query): -+ """Set the search query -+ @param query: string -+ -+ """ -+ self._query = query -+ self._CompileRegex() -+ -+ def SetUseRegex(self, use=True): -+ """Set whether the engine is using regular expresion searches or -+ not. -+ @keyword use: bool -+ -+ """ -+ self._isregex = use -+ self._CompileRegex() diff --git a/wxPython-2.8.11.0-aui.patch b/wxPython-2.8.11.0-aui.patch new file mode 100644 index 0000000..45fab7c --- /dev/null +++ b/wxPython-2.8.11.0-aui.patch @@ -0,0 +1,24 @@ +diff -up wxPython-src-2.8.11.0/wxPython/wx/tools/Editra/src/ed_pages.py.aui wxPython-src-2.8.11.0/wxPython/wx/tools/Editra/src/ed_pages.py +--- wxPython-src-2.8.11.0/wxPython/wx/tools/Editra/src/ed_pages.py.aui 2010-05-27 15:38:42.000000000 +0200 ++++ wxPython-src-2.8.11.0/wxPython/wx/tools/Editra/src/ed_pages.py 2010-05-27 15:38:50.000000000 +0200 +@@ -36,7 +36,7 @@ import ed_txt + import ed_mdlg + import ebmlib + import eclib +-from extern import aui ++from wx.lib.agw import aui + + #--------------------------------------------------------------------------# + # Globals +diff -up wxPython-src-2.8.11.0/wxPython/wx/tools/Editra/src/ed_shelf.py.aui wxPython-src-2.8.11.0/wxPython/wx/tools/Editra/src/ed_shelf.py +--- wxPython-src-2.8.11.0/wxPython/wx/tools/Editra/src/ed_shelf.py.aui 2010-05-27 15:38:20.000000000 +0200 ++++ wxPython-src-2.8.11.0/wxPython/wx/tools/Editra/src/ed_shelf.py 2010-05-27 15:38:28.000000000 +0200 +@@ -28,7 +28,7 @@ import ed_glob + from profiler import Profile_Get + import plugin + import iface +-import extern.aui as aui ++from wx.lib.agw import aui + + #--------------------------------------------------------------------------# + # Globals diff --git a/wxPython.spec b/wxPython.spec index ec91b1e..d8effbd 100644 --- a/wxPython.spec +++ b/wxPython.spec @@ -4,8 +4,8 @@ %define buildflags WXPORT=gtk2 UNICODE=1 Name: wxPython -Version: 2.8.10.1 -Release: 2%{?dist} +Version: 2.8.11.0 +Release: 1%{?dist} Summary: GUI toolkit for the Python programming language @@ -15,13 +15,12 @@ URL: http://www.wxpython.org/ Source0: http://downloads.sourceforge.net/wxpython/%{name}-src-%{version}.tar.bz2 # http://trac.wxwidgets.org/ticket/10703 Patch0: wxPython-2.8.9.2-treelist.patch -# backport to wxGTK 2.8.10 API -Patch1: wxPython-2.8.10-backport.patch -# add missing module - https://bugzilla.redhat.com/show_bug.cgi?id=573961 -Patch2: wxPython-2.8.10.1-ebmlib.patch +# fix aui imports +# http://trac.wxwidgets.org/ticket/12107 +Patch1: wxPython-2.8.11.0-aui.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # make sure to keep this updated as appropriate -BuildRequires: wxGTK-devel >= 2.8.10 +BuildRequires: wxGTK-devel >= 2.8.11 BuildRequires: python-devel # packages should depend on "wxPython", not "wxPythonGTK2", but in case @@ -61,8 +60,7 @@ Documentation, samples and demo application for wxPython. %prep %setup -q -n wxPython-src-%{version} %patch0 -p1 -b .treelist -%patch1 -p1 -%patch2 -p1 +%patch1 -p1 -b .aui # fix libdir otherwise additional wx libs cannot be found sed -i -e 's|/usr/lib|%{_libdir}|' wxPython/config.py @@ -121,6 +119,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon May 31 2010 Dan Horák - 2.8.11.0-1 +- update to 2.8.11.0 (#593837, #595936, #597639) + +* Sun May 2 2010 Dan Horák - 2.8.10.1-3 +- rebuilt with wxGTK 2.8.11 + * Wed Mar 17 2010 Dan Horák - 2.8.10.1-2 - add missing module (#573961) From eb33ca79b2c7ed2048721a184ae1eeff056e64af Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 11 Jul 2010 20:59:19 +0000 Subject: [PATCH 6/8] - Include egg-info when build on recent RHEL --- wxPython.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wxPython.spec b/wxPython.spec index d8effbd..cd99754 100644 --- a/wxPython.spec +++ b/wxPython.spec @@ -5,7 +5,7 @@ Name: wxPython Version: 2.8.11.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GUI toolkit for the Python programming language @@ -99,7 +99,7 @@ rm -rf $RPM_BUILD_ROOT %dir %{python_sitearch}/wx-2.8-gtk2-unicode/ %{python_sitearch}/wx-2.8-gtk2-unicode/wx %{python_sitearch}/wx-2.8-gtk2-unicode/wxPython -%if 0%{?fedora} >= 9 +%if 0%{?fedora} >= 9 || 0%{?rhel} >= 6 %{python_sitelib}/*egg-info %{python_sitearch}/wx-2.8-gtk2-unicode/*egg-info %endif @@ -119,6 +119,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Jul 11 2010 Lubomir Rintel - 2.8.11.0-2 +- Include egg-info when build on recent RHEL + * Mon May 31 2010 Dan Horák - 2.8.11.0-1 - update to 2.8.11.0 (#593837, #595936, #597639) From 2a4a1818f064461b13771a97d39af29c3d6e7a18 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 15:29:19 +0000 Subject: [PATCH 7/8] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - import.log | 1 - 4 files changed, 23 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch delete mode 100644 import.log diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 436fca0..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: wxPython -# $Id: Makefile,v 1.4 2005/12/21 13:19:54 mschwendt Exp $ -NAME := wxPython -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 46381b9..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -EL-6 diff --git a/import.log b/import.log deleted file mode 100644 index cb1e33f..0000000 --- a/import.log +++ /dev/null @@ -1 +0,0 @@ -wxPython-2_8_11_0-1_fc14:EL-6:wxPython-2.8.11.0-1.fc14.src.rpm:1278880487 From 16982772470d913e05e5f7665d25aad4e71f60a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Sat, 30 Apr 2011 16:08:20 +0200 Subject: [PATCH 8/8] update to 2.8.12.0 (#699207) --- .gitignore | 1 + sources | 2 +- wxPython-2.8.11.0-aui.patch | 24 ------------------------ wxPython-2.8.12.0-aui.patch | 24 ++++++++++++++++++++++++ wxPython-2.8.9.2-treelist.patch | 11 ----------- wxPython.spec | 14 +++++++------- 6 files changed, 33 insertions(+), 43 deletions(-) delete mode 100644 wxPython-2.8.11.0-aui.patch create mode 100644 wxPython-2.8.12.0-aui.patch delete mode 100644 wxPython-2.8.9.2-treelist.patch diff --git a/.gitignore b/.gitignore index 3a89b5e..ea61b77 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ wxPython-src-2.8.11.0.tar.bz2 +/wxPython-src-2.8.12.0.tar.bz2 diff --git a/sources b/sources index 08f0993..f117e2f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -63f73aae49e530852db56a31b57529fa wxPython-src-2.8.11.0.tar.bz2 +402e0b81e06f596d849e221a7a76acc6 wxPython-src-2.8.12.0.tar.bz2 diff --git a/wxPython-2.8.11.0-aui.patch b/wxPython-2.8.11.0-aui.patch deleted file mode 100644 index 45fab7c..0000000 --- a/wxPython-2.8.11.0-aui.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up wxPython-src-2.8.11.0/wxPython/wx/tools/Editra/src/ed_pages.py.aui wxPython-src-2.8.11.0/wxPython/wx/tools/Editra/src/ed_pages.py ---- wxPython-src-2.8.11.0/wxPython/wx/tools/Editra/src/ed_pages.py.aui 2010-05-27 15:38:42.000000000 +0200 -+++ wxPython-src-2.8.11.0/wxPython/wx/tools/Editra/src/ed_pages.py 2010-05-27 15:38:50.000000000 +0200 -@@ -36,7 +36,7 @@ import ed_txt - import ed_mdlg - import ebmlib - import eclib --from extern import aui -+from wx.lib.agw import aui - - #--------------------------------------------------------------------------# - # Globals -diff -up wxPython-src-2.8.11.0/wxPython/wx/tools/Editra/src/ed_shelf.py.aui wxPython-src-2.8.11.0/wxPython/wx/tools/Editra/src/ed_shelf.py ---- wxPython-src-2.8.11.0/wxPython/wx/tools/Editra/src/ed_shelf.py.aui 2010-05-27 15:38:20.000000000 +0200 -+++ wxPython-src-2.8.11.0/wxPython/wx/tools/Editra/src/ed_shelf.py 2010-05-27 15:38:28.000000000 +0200 -@@ -28,7 +28,7 @@ import ed_glob - from profiler import Profile_Get - import plugin - import iface --import extern.aui as aui -+from wx.lib.agw import aui - - #--------------------------------------------------------------------------# - # Globals diff --git a/wxPython-2.8.12.0-aui.patch b/wxPython-2.8.12.0-aui.patch new file mode 100644 index 0000000..bd631e0 --- /dev/null +++ b/wxPython-2.8.12.0-aui.patch @@ -0,0 +1,24 @@ +diff -up wxPython-src-2.8.12.0/wxPython/wx/tools/Editra/src/ed_pages.py.aui wxPython-src-2.8.12.0/wxPython/wx/tools/Editra/src/ed_pages.py +--- wxPython-src-2.8.12.0/wxPython/wx/tools/Editra/src/ed_pages.py.aui 2011-04-13 22:28:07.000000000 +0200 ++++ wxPython-src-2.8.12.0/wxPython/wx/tools/Editra/src/ed_pages.py 2011-04-26 08:40:13.000000000 +0200 +@@ -37,7 +37,7 @@ import ed_txt + import ed_mdlg + import ebmlib + import eclib +-from extern import aui ++from wx.lib.agw import aui + import ed_book + + #--------------------------------------------------------------------------# +diff -up wxPython-src-2.8.12.0/wxPython/wx/tools/Editra/src/ed_shelf.py.aui wxPython-src-2.8.12.0/wxPython/wx/tools/Editra/src/ed_shelf.py +--- wxPython-src-2.8.12.0/wxPython/wx/tools/Editra/src/ed_shelf.py.aui 2011-04-13 22:28:07.000000000 +0200 ++++ wxPython-src-2.8.12.0/wxPython/wx/tools/Editra/src/ed_shelf.py 2011-04-26 08:40:26.000000000 +0200 +@@ -29,7 +29,7 @@ from profiler import Profile_Get + import ed_msg + import plugin + import iface +-from extern import aui ++from wx.lib.agw import aui + import ed_book + + #--------------------------------------------------------------------------# diff --git a/wxPython-2.8.9.2-treelist.patch b/wxPython-2.8.9.2-treelist.patch deleted file mode 100644 index e7cf28b..0000000 --- a/wxPython-2.8.9.2-treelist.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- wxPython-src-2.8.9.2/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp.orig 2009-04-10 23:03:18.000000000 +0200 -+++ wxPython-src-2.8.9.2/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp 2009-04-10 23:03:41.000000000 +0200 -@@ -10321,7 +10321,7 @@ SWIGINTERN PyObject *_wrap_TreeListCtrl_ - PyObject *resultobj = 0; - wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ; - wxTreeItemId *arg2 = 0 ; -- wxTreeItemId const &arg3_defvalue = NULL ; -+ wxTreeItemId const &arg3_defvalue = (wxTreeItemId *) NULL ; - wxTreeItemId *arg3 = (wxTreeItemId *) &arg3_defvalue ; - bool arg4 = (bool) true ; - void *argp1 = 0 ; diff --git a/wxPython.spec b/wxPython.spec index cd99754..89a5b0d 100644 --- a/wxPython.spec +++ b/wxPython.spec @@ -4,8 +4,8 @@ %define buildflags WXPORT=gtk2 UNICODE=1 Name: wxPython -Version: 2.8.11.0 -Release: 2%{?dist} +Version: 2.8.12.0 +Release: 1%{?dist} Summary: GUI toolkit for the Python programming language @@ -13,11 +13,9 @@ Group: Development/Languages License: LGPLv2+ and wxWidgets URL: http://www.wxpython.org/ Source0: http://downloads.sourceforge.net/wxpython/%{name}-src-%{version}.tar.bz2 -# http://trac.wxwidgets.org/ticket/10703 -Patch0: wxPython-2.8.9.2-treelist.patch # fix aui imports # http://trac.wxwidgets.org/ticket/12107 -Patch1: wxPython-2.8.11.0-aui.patch +Patch0: wxPython-2.8.12.0-aui.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # make sure to keep this updated as appropriate BuildRequires: wxGTK-devel >= 2.8.11 @@ -59,8 +57,7 @@ Documentation, samples and demo application for wxPython. %prep %setup -q -n wxPython-src-%{version} -%patch0 -p1 -b .treelist -%patch1 -p1 -b .aui +%patch0 -p1 -b .aui # fix libdir otherwise additional wx libs cannot be found sed -i -e 's|/usr/lib|%{_libdir}|' wxPython/config.py @@ -119,6 +116,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Apr 26 2011 Dan Horák - 2.8.12.0-1 +- update to 2.8.12.0 (#699207) + * Sun Jul 11 2010 Lubomir Rintel - 2.8.11.0-2 - Include egg-info when build on recent RHEL