Skip to content

Commit 0f9a620

Browse files
authored
py 2/3 compatibility for setup
1 parent 1a9bef0 commit 0f9a620

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ def run(self):
9898
cfg_parser.read(pjoin(pkg_dir, 'COMMIT_INFO.txt'))
9999
cfg_parser.set('commit hash', 'install_hash', repo_commit)
100100
out_pth = pjoin(self.build_lib, pkg_dir, 'COMMIT_INFO.txt')
101-
cfg_parser.write(open(out_pth, 'wt'))
101+
if PY3:
102+
cfg_parser.write(open(out_pth, 'wt'))
103+
else:
104+
cfg_parser.write(open(out_pth, 'wb'))
102105
return MyBuildPy
103106

104107

0 commit comments

Comments
 (0)