fix setup to read version on windows (#145)

* fix setup to read version on windows

* remove redundat parameter U
This commit is contained in:
Alexander Pantyukhin 2018-04-11 15:20:01 +04:00 committed by Andrew Svetlov
parent c5c39ce2b8
commit 797d892ac1
1 changed files with 2 additions and 3 deletions

View File

@ -1,4 +1,3 @@
import codecs
from setuptools import setup, find_packages
import os
import re
@ -16,8 +15,8 @@ class PyTest(TestCommand):
raise SystemExit(errno)
with codecs.open(os.path.join(os.path.abspath(os.path.dirname(
__file__)), 'aiohttp_security', '__init__.py'), 'r', 'latin1') as fp:
with open(os.path.join(os.path.abspath(os.path.dirname(
__file__)), 'aiohttp_security', '__init__.py'), 'r', encoding='latin1') as fp:
try:
version = re.findall(r"^__version__ = '([^']+)'$", fp.read(), re.M)[0]
except IndexError: