<div dir="ltr">Hello everybody,<div><br></div><div>I'm trying to get sip bindings[1] for FakeVim[2] (Vim emulation in QTextEdit, QPlainTextEdit and similar Qt widgets), so of course it will be built on PyQt. However, I'm having a hard time getting a build system to reliably build those sip bindings on both PyQt4 and PyQt5.</div>
<div><br></div><div>With PyQt4, pyqtconfig made for a fairly simple configure.py, but I need it to work with both PyQt4 and PyQt5, so pyqtconfig is no longer an option.</div>
<div><br></div><div>The docs[3][4] list QScintilla as a good example of something that builds on PyQt.</div><div>Plus, according to Phil[5], I should just copy/paste/modify QScintilla's configure.py.</div><div>So, I copy/paste QScintilla's Python/configure*.py and then ran it through sed[6][7] to remove all of the QScintilla stuff.</div>
<div><br></div><div>When I showed what I did to hluk, the maintainer of FakeVim, he said[8]:</div><div>> The new configure.py file has over 1600 lines. This starts to be overly complicated.</div><div>> There must be simpler way to do this, otherwise it would be hell to maintain.</div>
<div><br></div><div>So, after searching docs, the ml, and the web in general, I'm looking for advice here: Isn't there a simpler way? A simple build system for modules that support extending both PyQt4 & PyQt5? There's only one sip file right now, so it seems like 1600 lines is quite a bit of overhead to compile so few sip bindings.</div>
<div><br></div><div>At least in its current state (run build.sh in the qscintilla folder[9]) my test can't import FakeVim, so I'm left wondering where the build system, or maybe the test script, needs to be tweaked.</div>
<div><br></div><div>What should I do next in my quest for FakeVim sip bindings for both PyQt 4 and PyQt 5? Is there a simpler build system than the one provided in QScintilla?</div><div><br></div><div>Thanks,<br>Jacob Floyd</div>
<div><br></div><div>[1] <a href="https://github.com/hluk/FakeVim/issues/5" target="_blank">https://github.com/hluk/FakeVim/issues/5</a></div><div>[2] <a href="https://github.com/hluk/FakeVim" target="_blank">https://github.com/hluk/FakeVim</a></div>
<div>[3] <a href="http://pyqt.sourceforge.net/Docs/PyQt4/build_system.html" target="_blank">http://pyqt.sourceforge.net/Docs/PyQt4/build_system.html</a></div><div>[4] <a href="http://pyqt.sourceforge.net/Docs/PyQt5/extension_api.html" target="_blank">http://pyqt.sourceforge.net/Docs/PyQt5/extension_api.html</a></div>
<div>[5] <a href="http://article.gmane.org/gmane.comp.python.pyqt-pykde/27125" target="_blank">http://article.gmane.org/gmane.comp.python.pyqt-pykde/27125</a></div><div>[6] <a href="https://github.com/hluk/FakeVim/issues/5#issuecomment-50088032" target="_blank">https://github.com/hluk/FakeVim/issues/5#issuecomment-50088032</a></div>
<div>[7] <a href="https://github.com/cognifloyd/FakeVim/blob/python/qscintilla/sed-configure.sh" target="_blank">https://github.com/cognifloyd/FakeVim/blob/python/qscintilla/sed-configure.sh</a></div><div>Aside: One of the issues that this sed script takes care of is changing</div>
<div>qscintilla's hardcoded sip files that are hardcoded outside of the "editable" section.<br></div><div>There is an assumption that sip files will always be in sip/ which should be editable.</div><div>[8] <a href="https://github.com/hluk/FakeVim/issues/5#issuecomment-50054483">https://github.com/hluk/FakeVim/issues/5#issuecomment-50054483</a></div>
<div>[9] <a href="https://github.com/cognifloyd/FakeVim/tree/python/qscintilla">https://github.com/cognifloyd/FakeVim/tree/python/qscintilla</a></div></div>