From 3db758f4e01cadf0b01534182efd47440caadbb8 Mon Sep 17 00:00:00 2001 From: Sambhav Kothari Date: Tue, 11 Apr 2017 01:00:04 +0530 Subject: [PATCH] PICARD-1065: Fix patch_version --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a537e1975..0da45e1dc 100755 --- a/setup.py +++ b/setup.py @@ -585,9 +585,9 @@ class picard_patch_version(Command): def patch_version(self, filename): regex = re.compile(r'^PICARD_BUILD_VERSION_STR\s*=.*$', re.MULTILINE) with open(filename, 'r+b') as f: - source = f.read() + source = (f.read()).decode() build = self.platform + '_' + datetime.datetime.utcnow().strftime('%Y%m%d%H%M%S') - patched_source = regex.sub('PICARD_BUILD_VERSION_STR = "%s"' % build, source) + patched_source = regex.sub('PICARD_BUILD_VERSION_STR = "%s"' % build, source).encode() f.seek(0) f.write(patched_source) f.truncate()