13
0

Make fetch_svn_revision work properly with python 3

git-svn-id: svn://localhost/ardour2/branches/3.0@14046 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Sakari Bergen 2013-02-03 13:21:52 +00:00
parent e0a1e756d3
commit 6dbfeaf164

View File

@ -59,7 +59,8 @@ else:
def fetch_svn_revision (path):
cmd = "svnversion | cut -d: -f1"
return subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].rstrip(os.linesep)
output = subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].decode(sys.stdout.encoding)
return output.rstrip(os.linesep)
def fetch_gcc_version (CC):
cmd = "LANG= %s --version" % CC
@ -112,7 +113,7 @@ def create_stored_revision():
try:
text = '#include "ardour/svn_revision.h"\n'
text += 'namespace ARDOUR { const char* svn_revision = \"%s\"; }\n' % rev
print('Writing svn revision info to libs/ardour/svn_revision.cc using ', rev)
print('Writing svn revision info to libs/ardour/svn_revision.cc using ' + rev)
o = open('libs/ardour/svn_revision.cc', 'w')
o.write(text)
o.close()