From ae6e1e9e2fde6d8029e7c7e02d3973e345708254 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Mon, 5 Apr 2021 19:11:58 -0400 Subject: [PATCH] Use io.open() instead of builtin open() Windows does not like when we open README.rst using builtin open(): Traceback (most recent call last): File "setup.py", line 360, in long_description=open('README.rst', 'rU').read(), File "c:\hostedtoolcache\windows\python\3.6.8\x64\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 1720: character maps to --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 308ac0334..df917eb40 100644 --- a/setup.py +++ b/setup.py @@ -11,6 +11,7 @@ import sys # See the docs/about.rst file for licensing information. import os, subprocess, re +from io import open basedir = os.path.dirname(os.path.abspath(__file__)) @@ -357,7 +358,7 @@ if version: setup(name="tahoe-lafs", # also set in __init__.py description='secure, decentralized, fault-tolerant file store', - long_description=open('README.rst', 'r').read(), + long_description=open('README.rst', 'r', encoding='utf-8').read(), author='the Tahoe-LAFS project', author_email='tahoe-dev@tahoe-lafs.org', url='https://tahoe-lafs.org/',