Skip to content

Commit

Permalink
Merge pull request #651 from gergondet/fix_non_utf8_setup
Browse files Browse the repository at this point in the history
Open README.rst with utf-8 encoding
  • Loading branch information
pganssle committed Mar 26, 2018
2 parents 5be0893 + 1c6952c commit dc809ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ switch, and thus all their contributions are dual-licensed.
- Pascal van Kooten <kootenpv@MASKED>
- Pavel Ponomarev <comrad.awsum@MASKED>
- Peter Bieringer <pb@MASKED>
- Pierre Gergondet <pierre.gergondet@MASKED> (gh: @gergondet)
- Quentin Pradet <quentin@MASKED>
- Roy Williams <rwilliams@MASKED>
- Savraj <savraj@MASKED>
Expand Down
1 change: 1 addition & 0 deletions changelog.d/651.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed an issue with the setup script running in non-UTF-8 environment. Reported and fixed by @gergondet (gh pr #651)
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
from distutils.version import LooseVersion
import warnings

import io

if isfile("MANIFEST"):
os.unlink("MANIFEST")

Expand All @@ -27,7 +29,7 @@ def run(self):
PACKAGES = find_packages(where='.', exclude=['dateutil.test'])

def README():
with open('README.rst') as f:
with io.open('README.rst', encoding='utf-8') as f:
readme_lines = f.readlines()

# The .. doctest directive is not supported by PyPA
Expand Down

0 comments on commit dc809ea

Please sign in to comment.