Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-

from kappa import __version__
import codecs
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

io.open is recommended for python >= 2.6.
I often use, from io import open to assure that python2 is using the python3 compatible open() which includes encoding specification.

https://mail.python.org/pipermail/python-list/2015-March/687124.html

import os

try:
Expand All @@ -11,7 +12,8 @@


def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname))
return codecs.open(os.path.join(os.path.dirname(__file__), fname),
encoding='utf-8')


def run_setup():
Expand Down