1 |
ultrabug 12/03/21 09:05:48 |
2 |
|
3 |
Added: mongodb-2.0.4-fix-utils.patch |
4 |
Log: |
5 |
Version bump, drop old |
6 |
|
7 |
(Portage version: 2.1.10.49/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-db/mongodb/files/mongodb-2.0.4-fix-utils.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/mongodb/files/mongodb-2.0.4-fix-utils.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/mongodb/files/mongodb-2.0.4-fix-utils.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: mongodb-2.0.4-fix-utils.patch |
16 |
=================================================================== |
17 |
--- a/buildscripts/utils.py |
18 |
+++ b/buildscripts/utils.py |
19 |
@@ -3,6 +3,8 @@ import re |
20 |
import socket |
21 |
import time |
22 |
import os |
23 |
+import sys |
24 |
+ |
25 |
# various utilities that are handy |
26 |
|
27 |
def getAllSourceFiles( arr=None , prefix="." ): |
28 |
@@ -139,6 +141,14 @@ def smoke_python_name(): |
29 |
# then we assume that "python" points to a 2.5 or |
30 |
# greater python VM. otherwise, explicitly use 2.5 |
31 |
# which we assume to be installed. |
32 |
+ min_version_tuple = (2, 5) |
33 |
+ try: |
34 |
+ if sys.version_info >= min_version_tuple: |
35 |
+ return sys.executable |
36 |
+ except AttributeError: |
37 |
+ # In case the version of Python is somehow missing sys.version_info or sys.executable. |
38 |
+ pass |
39 |
+ |
40 |
import subprocess |
41 |
version = re.compile(r'[Pp]ython ([\d\.]+)', re.MULTILINE) |
42 |
binaries = ['python2.5', 'python2.6', 'python2.7', 'python25', 'python26', 'python27', 'python'] |
43 |
@@ -150,7 +160,7 @@ def smoke_python_name(): |
44 |
match = version.search(stream) |
45 |
if match: |
46 |
versiontuple = tuple(map(int, match.group(1).split('.'))) |
47 |
- if versiontuple >= (2, 5): |
48 |
+ if versiontuple >= min_version_tuple: |
49 |
return binary |
50 |
except: |
51 |
pass |