Skip to content

Commit aeaec26

Browse files
altendkybbc2
authored andcommitted
Use io.open for py2 compatibility
1 parent cbd017a commit aeaec26

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
# -*- coding: utf-8 -*-
2+
import io
23
from setuptools import setup
34

45

56
def read_files(files):
67
data = []
78
for file in files:
8-
with open(file, encoding='utf-8') as f:
9+
with io.open(file, encoding='utf-8') as f:
910
data.append(f.read())
1011
return "\n".join(data)
1112

1213

1314
long_description = read_files(['README.md', 'CHANGELOG.md'])
1415

1516
meta = {}
16-
with open('./src/dotenv/version.py', encoding='utf-8') as f:
17+
with io.open('./src/dotenv/version.py', encoding='utf-8') as f:
1718
exec(f.read(), meta)
1819

1920
setup(

0 commit comments

Comments
 (0)