fix setup to read version on windows (#145)
* fix setup to read version on windows * remove redundat parameter U
This commit is contained in:
parent
c5c39ce2b8
commit
797d892ac1
5
setup.py
5
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:
|
||||
|
|
Loading…
Reference in New Issue