diff options
author | Eevee (Alex Munroe) <eevee.git@veekun.com> | 2014-10-13 15:06:46 -0700 |
---|---|---|
committer | Eevee (Alex Munroe) <eevee.git@veekun.com> | 2014-10-13 15:06:46 -0700 |
commit | 71e8a891eb22b702bd8000f27993cfdb3f1c40c4 (patch) | |
tree | 66eab2b2ed7e4e8bcc737521855d79356a76faa5 /setup.py | |
parent | 0bb2b63aa9de9ab58a2cfc0be0525f8f9a8f113b (diff) | |
download | pyscss-71e8a891eb22b702bd8000f27993cfdb3f1c40c4.tar.gz |
Explicitly decode file contents in setup.py. Fixes #308.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -10,7 +10,8 @@ from setuptools import setup, Extension, Feature # this imports PROJECT, URL, VERSION, AUTHOR, AUTHOR_EMAIL, LICENSE, # DOWNLOAD_URL -exec(open('scss/scss_meta.py').read()) +with open('scss/scss_meta.py') as f: + exec(f.read().decode('utf8')) # Dependencies install_requires = ['six'] @@ -75,7 +76,8 @@ def echo(msg=''): def read(fname): try: - return open(os.path.join(os.path.dirname(__file__), fname)).read().strip() + with open(os.path.join(os.path.dirname(__file__), fname)) as f: + return f.read().decode('utf8').strip() except IOError: return '' |