From 797d892ac123061dd92a70111e5aea7487973313 Mon Sep 17 00:00:00 2001 From: Alexander Pantyukhin Date: Wed, 11 Apr 2018 15:20:01 +0400 Subject: [PATCH] fix setup to read version on windows (#145) * fix setup to read version on windows * remove redundat parameter U --- setup.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 7b1be8c..fa92657 100644 --- a/setup.py +++ b/setup.py @@ -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: