File tree 2 files changed +17
-12
lines changed
2 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -51,16 +51,7 @@ def extra_requirements(self):
51
51
52
52
@property
53
53
def python_interpreter (self ):
54
- ver = self .python_version
55
- if ver in [2 , 3 ]:
56
- # Get the highest version of the major series version if user only
57
- # gave us a version of '2', or '3'
58
- ver = max (
59
- list (
60
- filter (
61
- lambda x : x < ver + 1 ,
62
- self ._yaml_config .get_valid_python_versions (),
63
- )))
54
+ ver = self .python_full_version
64
55
return 'python{0}' .format (ver )
65
56
66
57
@property
@@ -75,6 +66,20 @@ def python_version(self):
75
66
version = 3
76
67
return version
77
68
69
+ @property
70
+ def python_full_version (self ):
71
+ ver = self .python_version
72
+ if ver in [2 , 3 ]:
73
+ # Get the highest version of the major series version if user only
74
+ # gave us a version of '2', or '3'
75
+ ver = max (
76
+ list (
77
+ filter (
78
+ lambda x : x < ver + 1 ,
79
+ self ._yaml_config .get_valid_python_versions (),
80
+ )))
81
+ return ver
82
+
78
83
@property
79
84
def use_system_site_packages (self ):
80
85
if 'use_system_site_packages' in self ._yaml_config .get ('python' , {}):
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ def is_obsolete(self):
142
142
# used to create the venv but we can still compare it against the new
143
143
# one coming from the project version config.
144
144
return any ([
145
- env_python_version != self .config .python_version ,
145
+ env_python_version != self .config .python_full_version ,
146
146
env_build_image != build_image ,
147
147
])
148
148
@@ -153,7 +153,7 @@ def save_environment_json(self):
153
153
154
154
data = {
155
155
'python' : {
156
- 'version' : self .config .python_version ,
156
+ 'version' : self .config .python_full_version ,
157
157
},
158
158
'build' : {
159
159
'image' : build_image ,
You can’t perform that action at this time.
0 commit comments