Fix python3 setup.py clean failing to read unicode from

debian/changelog.
This commit is contained in:
Dimitri John Ledkov 2015-01-19 14:08:51 +00:00
parent dbeddb5559
commit 9d09768bd1
2 changed files with 9 additions and 1 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
ubuntu-dev-tools (0.155) UNRELEASED; urgency=medium
* Fix python3 setup.py clean failing to read unicode from
debian/changelog.
-- Dimitri John Ledkov <dimitri.j.ledkov@linux.intel.com> Sat, 17 Jan 2015 15:40:33 +0000
ubuntu-dev-tools (0.154) experimental; urgency=medium
[ Logan Rosen ]

View File

@ -5,11 +5,12 @@ import glob
import os
import re
import sys
import codecs
# look/set what version we have
changelog = "debian/changelog"
if os.path.exists(changelog):
head=open(changelog).readline()
head=codecs.open(changelog, 'r', 'utf-8', 'replace').readline()
match = re.compile(".*\((.*)\).*").match(head)
if match:
version = match.group(1)