Skip to content

Commit 036f673

Browse files
committed
fix packaging for windows under python 3
1 parent 7828217 commit 036f673

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,10 @@ def build_py_ext(obj):
161161
else:
162162
f.write(u'include pcbasic/lib/win32_x86/*.dll\n')
163163
with open(os.path.join(HERE, 'pcbasic', 'data', 'release.json'), 'w') as f:
164-
f.write(json.dumps(RELEASE_ID).decode('ascii', 'ignore'))
164+
json_str = json.dumps(RELEASE_ID)
165+
if isinstance(json_str, bytes):
166+
json_str = json_str.decode('ascii', 'ignore')
167+
f.write(json_str)
165168
build_py.build_py.run(obj)
166169
os.remove(os.path.join(HERE, 'MANIFEST.in'))
167170
os.remove(os.path.join(HERE, 'pcbasic', 'data', 'release.json'))

0 commit comments

Comments
 (0)