Skip to content

Commit

Permalink
Merge branch 'io'
Browse files Browse the repository at this point in the history
  • Loading branch information
myint committed Apr 26, 2014
2 parents 7401c71 + 0a0de92 commit 3038af5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""Setup for autopep8."""

import ast
import io
import sys

from setuptools import setup
Expand All @@ -17,13 +18,13 @@

def version():
"""Return version string."""
with open('autopep8.py') as input_file:
with io.open('autopep8.py') as input_file:
for line in input_file:
if line.startswith('__version__'):
return ast.parse(line).body[0].value.s


with open('README.rst') as readme:
with io.open('README.rst') as readme:
setup(
name='autopep8',
version=version(),
Expand Down

0 comments on commit 3038af5

Please sign in to comment.