make setup.py work with python3.2

This commit is contained in:
j 2014-10-05 20:40:04 +02:00
parent 70877008d9
commit 4df6f5afcc

View file

@ -17,7 +17,7 @@ def get_version():
rev = int(f.read().split()[0]) rev = int(f.read().split()[0])
f.close() f.close()
if rev: if rev:
version = u"2.3.%s"%rev version = "2.3.%d" % rev
with open(__version, 'w') as fd: with open(__version, 'w') as fd:
fd.write('VERSION="%s"'%version) fd.write('VERSION="%s"'%version)
return version return version
@ -34,8 +34,8 @@ def get_version():
f.close() f.close()
rev = re.compile('\d+\.\d+\.(\d+)').findall(head) rev = re.compile('\d+\.\d+\.(\d+)').findall(head)
if rev: if rev:
return u'2.3.%s'%rev[0] return '2.3.%s' % rev[0]
return u'2.3.x' return '2.3.x'
setup( setup(
name="ox", name="ox",