build: version string as native str type for each Python version

Should resolve the "mpv b'...'" issue on Python 3 without breaking
things on Python 2.

Also, remove redundant wait for process.
This commit is contained in:
Philip Sequeira 2014-06-13 14:12:06 -04:00 committed by wm4
parent f193d25844
commit a7293b92f4
1 changed files with 4 additions and 2 deletions

View File

@ -4,9 +4,11 @@ def __get_version__(ctx):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd=ctx.srcnode.abspath())
process.wait()
(version, err) = process.communicate()
return version.strip().decode('utf-8').encode('ascii', 'ignore')
version = version.strip()
if not isinstance(version, str):
version = version.decode('utf-8')
return version
def __get_build_date__():
import time