File tree 2 files changed +10
-16
lines changed
2 files changed +10
-16
lines changed Original file line number Diff line number Diff line change 15
15
# This file incorporates work covered by the following copyright:
16
16
# Copyright 2010-2016 RethinkDB, all rights reserved.
17
17
18
- VERSION = "2.4.0 +source"
18
+ VERSION = "2.4.11 +source"
Original file line number Diff line number Diff line change 21
21
22
22
import setuptools
23
23
24
- from rethinkdb .version import VERSION
25
-
26
24
try :
27
25
import asyncio
28
26
32
30
33
31
34
32
RETHINKDB_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-]+)?"
39
34
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 ))
42
38
43
- if MATCH .group ("patch" ):
44
- VERSION += "." + MATCH .group ("patch" )
45
39
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 )
48
42
49
- with open ("rethinkdb/version.py" , "w" ) as f :
50
- f .write ('VERSION = {0}' .format (repr (VERSION )))
51
- else :
43
+ if not version_parts :
52
44
raise RuntimeError ("{!r} does not match version format {!r}" .format (
53
45
RETHINKDB_VERSION_DESCRIBE , VERSION_RE ))
54
46
47
+ VERSION = "." .join (filter (lambda x : x is not None , version_parts .groups ()))
48
+
55
49
56
50
setuptools .setup (
57
51
name = 'rethinkdb' ,
You can’t perform that action at this time.
0 commit comments