mirror of https://github.com/python/cpython.git
bpo-38820: Old OpenSSL 3.0.0 releases are in /old/3.0/ (GH-25624)
Signed-off-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
3c4850e222
commit
3c586ca500
|
@ -33,6 +33,7 @@
|
||||||
from urllib.error import HTTPError
|
from urllib.error import HTTPError
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from urllib2 import urlopen, HTTPError
|
from urllib2 import urlopen, HTTPError
|
||||||
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import string
|
import string
|
||||||
import subprocess
|
import subprocess
|
||||||
|
@ -448,11 +449,14 @@ def _post_install_300(self):
|
||||||
@property
|
@property
|
||||||
def short_version(self):
|
def short_version(self):
|
||||||
"""Short version for OpenSSL download URL"""
|
"""Short version for OpenSSL download URL"""
|
||||||
short_version = self.version.rstrip(string.ascii_letters)
|
mo = re.search(r"^(\d+)\.(\d+)\.(\d+)", self.version)
|
||||||
if short_version.startswith("0.9"):
|
parsed = tuple(int(m) for m in mo.groups())
|
||||||
short_version = "0.9.x"
|
if parsed < (1, 0, 0):
|
||||||
return short_version
|
return "0.9.x"
|
||||||
|
if parsed >= (3, 0, 0):
|
||||||
|
# OpenSSL 3.0.0 -> /old/3.0/
|
||||||
|
parsed = parsed[:2]
|
||||||
|
return ".".join(str(i) for i in parsed)
|
||||||
|
|
||||||
class BuildLibreSSL(AbstractBuilder):
|
class BuildLibreSSL(AbstractBuilder):
|
||||||
library = "LibreSSL"
|
library = "LibreSSL"
|
||||||
|
|
Loading…
Reference in New Issue