Pin setuptools<45.0.0 for setupOpenstackVirtualenv
* Unhardcode python version for setupOpenstackVirtualenv
Change-Id: I45c56c8d6dec98ee24e600d595c33a5e1a2641e6
Related-Prod: PRODX-2254
diff --git a/src/com/mirantis/mk/Python.groovy b/src/com/mirantis/mk/Python.groovy
index d82f68a..9d07d47 100644
--- a/src/com/mirantis/mk/Python.groovy
+++ b/src/com/mirantis/mk/Python.groovy
@@ -39,7 +39,8 @@
pipPackage = "\"pip<=19.3.1\""
common.infoMsg("Pinning pip package due to end of life of Python2 to ${pipPackage} version.")
}
- runVirtualenvCommand(path, "pip install -U setuptools ${pipPackage}")
+ // NOTE(vsaienko): pin setuptools explicitly for latest version that works with python2
+ runVirtualenvCommand(path, "pip install -U \"setuptools<45.0.0\" ${pipPackage}")
} catch (Exception e) {
common.warningMsg("Setuptools and pip cannot be updated, you might be offline but OFFLINE_DEPLOYMENT global property not initialized!")
}
@@ -156,11 +157,11 @@
*
* @param path Path where virtualenv is created
*/
-def setupDocutilsVirtualenv(path) {
+def setupDocutilsVirtualenv(path, python="python2") {
requirements = [
'docutils',
]
- setupVirtualenv(path, 'python2', requirements)
+ setupVirtualenv(path, python, requirements)
}