summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorNicolas Pauss <nicolas.pauss@intersec.com>2020-03-08 17:44:23 +0100
committerNicolas Pauss <nicolas.pauss@intersec.com>2020-03-08 18:25:13 +0100
commit409222c669d0cf4c0c39ca569f2f14d63d93a8ab (patch)
tree1e731e42a5a5f33799de9e7dae69c287ed22b496 /setup.py
parent9ff9f2a325125bdacc41f33ceccf20302ba1e52c (diff)
downloadpycurl-409222c669d0cf4c0c39ca569f2f14d63d93a8ab.tar.gz
Use centos6 ssl detection for other recent centos versions.
The most recent Centos versions, 7 and 8, have the same issue as centos 6, the ssl backend is not automatically detected through conventional ways. So the detection of the ssl backend on Centos 6, should be used for recent Centos versions as well.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 48ab1f1..b82d654 100644
--- a/setup.py
+++ b/setup.py
@@ -211,7 +211,7 @@ class ExtensionConfiguration(object):
and not os.environ.get('PYCURL_SSL_LIBRARY'):
# this path should only be taken when no options or
# configuration environment variables are given to setup.py
- ssl_lib_detected = self.detect_ssl_lib_on_centos6()
+ ssl_lib_detected = self.detect_ssl_lib_on_centos6_plus()
self.ssl_lib_detected = ssl_lib_detected
@@ -372,7 +372,7 @@ manually. For other SSL backends please ignore this message.''')
ssl_lib_detected = 'mbedtls'
return ssl_lib_detected
- def detect_ssl_lib_on_centos6(self):
+ def detect_ssl_lib_on_centos6_plus(self):
import platform
from ctypes.util import find_library
os_name = platform.system()
@@ -380,7 +380,7 @@ manually. For other SSL backends please ignore this message.''')
return False
dist_name, dist_version, _ = platform.dist()
dist_version = dist_version.split('.')[0]
- if dist_name != 'centos' or dist_version != '6':
+ if dist_name != 'centos' or int(dist_version) < 6:
return False
libcurl_dll_path = find_library('curl')
print('libcurl_dll_path = "%s"' % libcurl_dll_path)