Просмотр исходного кода

Fix setup.py:
* read "README.md" with "utf-8" encoding

egor 6 лет назад
Родитель
Сommit
29fd29e67a
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      setup.py

+ 3 - 1
setup.py

@@ -11,6 +11,7 @@ except ImportError:
 else:
     has_setuptools = True
 from distutils.core import Distribution
+import io
 import os
 import sys
 
@@ -83,7 +84,8 @@ if has_setuptools:
     setup_kwargs['test_suite'] = 'dulwich.tests.test_suite'
     setup_kwargs['tests_require'] = tests_require
 
-with open('README.md', 'r') as f:
+with io.open(os.path.join(os.path.dirname(__file__), "README.md"),
+             encoding="utf-8") as f:
     description = f.read()
 
 setup(name='dulwich',