File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 3333 from urllib .error import HTTPError
3434except ImportError :
3535 from urllib2 import urlopen , HTTPError
36+ import re
3637import shutil
3738import string
3839import subprocess
@@ -448,11 +449,14 @@ def _post_install_300(self):
448449 @property
449450 def short_version (self ):
450451 """Short version for OpenSSL download URL"""
451- short_version = self .version .rstrip (string .ascii_letters )
452- if short_version .startswith ("0.9" ):
453- short_version = "0.9.x"
454- return short_version
455-
452+ mo = re .search (r"^(\d+)\.(\d+)\.(\d+)" , self .version )
453+ parsed = tuple (int (m ) for m in mo .groups ())
454+ if parsed < (1 , 0 , 0 ):
455+ return "0.9.x"
456+ if parsed >= (3 , 0 , 0 ):
457+ # OpenSSL 3.0.0 -> /old/3.0/
458+ parsed = parsed [:2 ]
459+ return "." .join (str (i ) for i in parsed )
456460
457461class BuildLibreSSL (AbstractBuilder ):
458462 library = "LibreSSL"
You can’t perform that action at this time.
0 commit comments