+ def install_pip2(self):
+
+ replacements = [
+ "http://mirror.onelab.eu/third-party/python2-pip-19.1.1-7.fc33.noarch.rpm",
+ ]
+
+ return (
+ self.run_in_guest("pip2 --version") == 0
+ or self.run_in_guest("dnf install python2-pip") == 0
+ or self.run_in_guest("dnf localinstall -y " + " ".join(replacements)) == 0)
+
+
+ def install_m2crypto(self):
+
+ # installing m2crypto for python2 is increasingly difficult
+ # f29 and f31: dnf install python2-m2crypto
+ # f33: no longer available but the f31 repos below do the job just fine
+ # note that using pip2 does not look like a viable option because it does
+ # an install from sources and that's quite awkward
+
+ replacements = [
+ # no longer on our mirror
+ "https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/31/Everything/x86_64/os/Packages/p/python2-typing-3.6.2-5.fc31.noarch.rpm",
+ "https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/31/Everything/x86_64/os/Packages/p/python2-m2crypto-0.35.2-2.fc31.x86_64.rpm",
+ ]
+
+ return (
+ self.run_in_guest('python2 -c "import M2Crypto"', backslash=True) == 0
+ or self.run_in_guest("pip2 install python2-m2crypto") == 0
+ or self.run_in_guest("dnf localinstall -y " + " ".join(replacements)) == 0)
+
+ # about pip2: the logic goes like this
+ # check for pip2 command
+ # if not, try dnf install python2-pip
+ # if still not, dnf localinstall the above
+
+