Read README.rst and HISTORY.rst in UTF-8
Since README.rst now contains a snowman character, running setup.py on Python 3 with a locale encoding different than UTF-8 doesn't work anymore. Specify the UTF-8 encoding when reading README.rst and HISTORY.rst in setup.py to fix this issue.
This commit is contained in:
5
setup.py
5
setup.py
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import io
|
||||
import os
|
||||
import sys
|
||||
|
||||
@@ -18,10 +19,10 @@ packages = [
|
||||
'rfc3986',
|
||||
]
|
||||
|
||||
with open('README.rst') as f:
|
||||
with io.open('README.rst', encoding='utf-8') as f:
|
||||
readme = f.read()
|
||||
|
||||
with open('HISTORY.rst') as f:
|
||||
with io.open('HISTORY.rst', encoding='utf-8') as f:
|
||||
history = f.read()
|
||||
|
||||
setup(
|
||||
|
||||
Reference in New Issue
Block a user