GNOME Bugzilla – Bug 701009
pygobject 'make check' fails with pyflakes 0.7.2
Last modified: 2013-07-05 10:06:32 UTC
'make check' runs fine with pyflakes 0.6.1, but fails with 0.7.2 on Fedora 19: CHECK Pyflakes ../gi/overrides/GObject.py:451: syntax error in doctest ../gi/overrides/GObject.py:452: syntax error in doctest ../gi/overrides/GObject.py:619: syntax error in doctest ../gi/overrides/GObject.py:620: syntax error in doctest ../gi/overrides/Gtk.py:476: undefined name 'dialog' ../gi/_gobject/propertyhelper.py:51: syntax error in doctest ../gi/_gobject/propertyhelper.py:52: syntax error in doctest ../gi/_gobject/propertyhelper.py:54: undefined name 'MyObject'
It might make sense to tie PyGObjects "make check" to a specific version of PyFlakes and give a warning if the version is incorrect (rather than fail). This problem has the potential to constantly reappear otherwise.
Created attachment 248044 [details] [review] Limit "make check" to use specific pyflakes version If pyflakes (specifically version 0.6.1) is not installed, don't fail "make check". This allows distros which ship different versions of pyflakes to not bail with "make check". This should be backpatched into 3.8 and the ticket kept open for upgrading to pyflakes 0.7.2. Note: I know very little shell and autotools programming, suggestions for a better way are very welcome.
Comment on attachment 248044 [details] [review] Limit "make check" to use specific pyflakes version I don't particularly like the strict equality testing. How about @if type pyflakes >/dev/null 2>&1 && expr "`pyflakes --version`" '<' 0.7 >/dev/null; then [...] (and also adjust the echo accordingly)?
Fixed in https://git.gnome.org/browse/pygobject/commit/?id=ae3439f1d22482d, also cherry-picked to 3-8 branch. Tested with pyflakes 0.7.3.
Awesome, thanks!