Skip to content

Commit

Permalink
Fix README read error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy HUBSCHER committed Apr 18, 2018
1 parent 1ec618f commit 69cf595
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import codecs
from os.path import abspath, dirname, join
from setuptools import find_packages, setup

here = abspath(dirname(__file__))


def read_relative_file(filename):
"""Returns contents of the given file, whose path is supposed relative
to this module."""
with open(join(dirname(abspath(__file__)), filename)) as f:
return f.read()
with codecs.open(join(here, filename), encoding='utf-8') as f:
content = f.read()
return content


if __name__ == '__main__': # ``import setup`` doesn't trigger setup().
Expand Down

0 comments on commit 69cf595

Please sign in to comment.