GNOME Bugzilla – Bug 731042
pygobject-3.12.2: pyflakes tests fail
Last modified: 2014-08-06 02:22:05 UTC
With pyflakes-0.7.3: make -j5 check Making check in . make[1]: Entering directory `/var/tmp/portage/dev-python/pygobject-3.12.2/work/pygobject-3.12.2-python3_3' for f in gi/__init__.py gi/types.py gi/module.py gi/importer.py gi/pygtkcompat.py gi/docstring.py gi/_constants.py gi/_propertyhelper.py gi/_signalhelper.py gi/_option.py; do \ [ -e ./$f ] || \ ln -s /var/tmp/portage/dev-python/pygobject-3.12.2/work/pygobject-3.12.2-python3_3/$f ./$f; \ done make check-local make[2]: Entering directory `/var/tmp/portage/dev-python/pygobject-3.12.2/work/pygobject-3.12.2-python3_3' for f in gi/__init__.py gi/types.py gi/module.py gi/importer.py gi/pygtkcompat.py gi/docstring.py gi/_constants.py gi/_propertyhelper.py gi/_signalhelper.py gi/_option.py; do \ [ -e ./$f ] || \ ln -s /var/tmp/portage/dev-python/pygobject-3.12.2/work/pygobject-3.12.2-python3_3/$f ./$f; \ done CHECK Pyflakes examples gi tests pygtkcompat examples/properties.py:18: invalid syntax print "MyObject properties: ", list(MyObject.props) ^ tests/runtests-windows.py:47: invalid syntax except Exception, e: ^ gi/_option.py:40: undefined name 'basestring' gi/_propertyhelper.py:46: undefined name 'basestring' gi/_propertyhelper.py:47: undefined name 'long' gi/overrides/GObject.py:259: undefined name 'unicode' gi/overrides/Gtk.py:35: undefined name 'basestring' tests/test_properties.py:35: undefined name 'unicode' tests/test_properties.py:842: undefined name 'long' tests/test_everything.py:30: undefined name 'unicode' tests/compathelper.py:66: undefined name 'long' tests/compathelper.py:67: undefined name 'basestring' tests/compathelper.py:69: undefined name 'unicode' tests/test_gi.py:29: undefined name 'unicode' make[2]: *** [check-local] Error 1 make[2]: Leaving directory `/var/tmp/portage/dev-python/pygobject-3.12.2/work/pygobject-3.12.2-python3_3' make[1]: *** [check-am] Error 2 make[1]: Leaving directory `/var/tmp/portage/dev-python/pygobject-3.12.2/work/pygobject-3.12.2-python3_3' make: *** [check-recursive] Error 1
I've fixed some of this with: https://git.gnome.org/browse/pygobject/commit/?id=4941691 The remaining undefined names 'basestring', long', and 'unicode' are a problem because they are only used in the context of Python 2.7 where they are valid. Note that these errors only show up when running pyflakes under Python3. "make check" should only be using the Python 2.7 version of pyflakes (named /usr/bin/pyflakes on my system), why is your system using the Python 3 version by default? In Fedora this is named "python3-pyflakes" which is done exactly to avoid these kinds of problems...
I've fixed what I could. If the distro being used is installing a Python 3 version of pyflakes as /usr/bin/pyflakes then that is a broken distro...