Skip to content

Commit

Permalink
Explicitly state 'UTF-8' encoding in setup when reading files (#23)
Browse files Browse the repository at this point in the history
* Explicitly state 'UTF-8' encoding in setup when reading files
* exclude files from package
  • Loading branch information
thijstriemstra committed Oct 22, 2017
1 parent 00ea92a commit 5195436
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ recursive-exclude * __pycache__
recursive-exclude * *.py[co]
recursive-exclude * *~
recursive-exclude * .coverage
recursive-exclude * .DS_Store
recursive-exclude * .ropeproject
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

import os
import sys
from io import open
from setuptools import setup


def read_file(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as r:
def read_file(fname, encoding='utf-8'):
with open(os.path.join(os.path.dirname(__file__), fname), encoding=encoding) as r:
return r.read()


Expand Down

0 comments on commit 5195436

Please sign in to comment.