下载网址
https://sourceforge.net/p/wxpython/activity/?page=0&limit=100#54111c8734309d3223d507d4
编译
-
解压
tar -jxf wxPython-src-3.0.2.0.tar.bz2
-
修改文件src/stc/scintilla/src/Editor.cxx
添加头文件:
#include修改5847行跟5845行abs函数为std:abs
-
替换函数
sed -i ‘s@PyErr_Format(PyExc_RuntimeError, mesg)@PyErr_Format(PyExc_RuntimeError,"%s", mesg)@g’ src/gtk/html_wrap.cpp
sed -i ‘s@PyErr_Format(PyExc_RuntimeError, mesg)@PyErr_Format(PyExc_RuntimeError,"%s", mesg)@g’ src/gtk/html_wrap.cpp src/gtk/*
sed -i ‘s@PyErr_Format(PyExc_RuntimeError, mesg)@PyErr_Format(PyExc_RuntimeError,"%s", mesg)@g’ contrib/gizmos/*
sed -i ‘s@PyErr_Format(PyExc_RuntimeError, mesg)@PyErr_Format(PyExc_RuntimeError,"%s", mesg)@g’ contrib/activex/*
sed -i ‘s@PyErr_Format(PyExc_RuntimeError, mesg)@PyErr_Format(PyExc_RuntimeError,"%s", mesg)@g’ contrib/gizmos/gtk/* -
进入目录
cd wxPython
python build-wxpython.py --prefix=/usr/local/lib/python2.7/dist-packages/ --install