File tree Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Original file line number Diff line number Diff line change 1515# This file incorporates work covered by the following copyright:
1616# Copyright 2010-2016 RethinkDB, all rights reserved.
1717
18- VERSION = "2.4.0 +source"
18+ VERSION = "2.4.11 +source"
Original file line number Diff line number Diff line change 2121
2222import setuptools
2323
24- from rethinkdb .version import VERSION
25-
2624try :
2725 import asyncio
2826
3230
3331
3432RETHINKDB_VERSION_DESCRIBE = os .environ .get ("RETHINKDB_VERSION_DESCRIBE" )
35- VERSION_RE = r"^v(?P<version>\d+\.\d+)\.(?P<patch>\d+)?(\.(?P<post>\w+))?$"
36-
37- if RETHINKDB_VERSION_DESCRIBE :
38- MATCH = re .match (VERSION_RE , RETHINKDB_VERSION_DESCRIBE )
33+ VERSION_RE = r"(?P<major>[0-9]+)\.(?P<minor>[0-9]+)\.(?P<patch>[0-9]+)(?P<pre_release>:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?P<meta>:\+[0-9A-Za-z-]+)?"
3934
40- if MATCH :
41- VERSION = MATCH .group ("version" )
35+ with open ("rethinkdb/version.py" , "r" ) as f :
36+ version_parts = re .search (VERSION_RE , f .read ()).groups ()
37+ VERSION = "." .join (filter (lambda x : x is not None , version_parts ))
4238
43- if MATCH .group ("patch" ):
44- VERSION += "." + MATCH .group ("patch" )
4539
46- if MATCH . group ( "post" ) :
47- VERSION += "." + MATCH . group ( "post" )
40+ if RETHINKDB_VERSION_DESCRIBE :
41+ version_parts = re . match ( VERSION_RE , RETHINKDB_VERSION_DESCRIBE )
4842
49- with open ("rethinkdb/version.py" , "w" ) as f :
50- f .write ('VERSION = {0}' .format (repr (VERSION )))
51- else :
43+ if not version_parts :
5244 raise RuntimeError ("{!r} does not match version format {!r}" .format (
5345 RETHINKDB_VERSION_DESCRIBE , VERSION_RE ))
5446
47+ VERSION = "." .join (filter (lambda x : x is not None , version_parts .groups ()))
48+
5549
5650setuptools .setup (
5751 name = 'rethinkdb' ,
You can’t perform that action at this time.
0 commit comments