File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 2222 raise RuntimeError ('uvloop requires Python 3.5 or 3.6b3 or greater' )
2323
2424
25- VERSION = '0.9.2.dev0'
2625CFLAGS = ['-O2' ]
2726LIBUV_DIR = os .path .join (os .path .dirname (__file__ ), 'vendor' , 'libuv' )
2827LIBUV_BUILD_DIR = os .path .join (os .path .dirname (__file__ ), 'build' , 'libuv' )
@@ -211,6 +210,18 @@ def build_extensions(self):
211210 readme = f .read ()
212211
213212
213+ with open (os .path .join (
214+ os .path .dirname (__file__ ), 'uvloop' , '__init__.py' )) as f :
215+ for line in f :
216+ if line .startswith ('__version__ =' ):
217+ _ , _ , version = line .partition ('=' )
218+ VERSION = version .strip (" \n '\" " )
219+ break
220+ else :
221+ raise RuntimeError (
222+ 'unable to read the version from uvloop/__init__.py' )
223+
224+
214225setup (
215226 name = 'uvloop' ,
216227 description = 'Fast implementation of asyncio event loop on top of libuv' ,
Original file line number Diff line number Diff line change 77from .loop import Loop as __BaseLoop # NOQA
88
99
10+ __version__ = '0.9.2.dev0'
1011__all__ = ('new_event_loop' , 'EventLoopPolicy' )
1112
1213
You can’t perform that action at this time.
0 commit comments