Force python2.7 for bindep-env

We are currently seeing the following traceback for fedora-25:

 Traceback (most recent call last):
   File "/usr/bindep-env/bin/bindep", line 11, in <module>
     sys.exit(main())
   File "/usr/bindep-env/lib/python3.5/site-packages/bindep/main.py", line 64, in main
     errors = depends.check_rules(rules)
   File "/usr/bindep-env/lib/python3.5/site-packages/bindep/depends.py", line 205, in check_rules
     installed = self.platform.get_pkg_version(rule[0])
   File "/usr/bindep-env/lib/python3.5/site-packages/bindep/depends.py", line 313, in get_pkg_version
     universal_newlines=True).decode('utf-8')
 AttributeError: 'str' object has no attribute 'decode'

Until fixed, pin to python2.7.

Change-Id: I5ac830b5f2f841dc50dafb58dccad6602afe448a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2017-04-10 19:09:26 -04:00
parent fbf7661ed1
commit 4b5a153a57
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
1 changed files with 2 additions and 1 deletions

View File

@ -22,5 +22,6 @@ if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
fi
set -e
sudo -H virtualenv /usr/bindep-env
# TODO(pabelanger): Force python2.7 for now, until we can fix bindep properly.
sudo -H virtualenv --python /usr/bin/python2.7 /usr/bindep-env
sudo -H /usr/bindep-env/bin/pip install bindep