Skip to content

Commit 8e607d1

Browse files
terrytangyuanperimosocordiae
authored andcommitted
Fix python2.7 compatibility in setup.py (#126)
1 parent 617f7e5 commit 8e607d1

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
@@ -2,13 +2,14 @@
22
# -*- coding: utf-8 -*-
33
from setuptools import setup
44
import os
5+
import io
56

67
version = {}
7-
with open(os.path.join('metric_learn', '_version.py')) as fp:
8+
with io.open(os.path.join('metric_learn', '_version.py')) as fp:
89
exec(fp.read(), version)
910

1011
# Get the long description from README.md
11-
with open('README.rst', encoding='utf-8') as f:
12+
with io.open('README.rst', encoding='utf-8') as f:
1213
long_description = f.read()
1314

1415
setup(name='metric-learn',

0 commit comments

Comments
 (0)