Lines 24-30
host_platform = get_platform()
Link Here
|
24 |
TEST_EXTENSIONS = True |
24 |
TEST_EXTENSIONS = True |
25 |
|
25 |
|
26 |
# This global variable is used to hold the list of modules to be disabled. |
26 |
# This global variable is used to hold the list of modules to be disabled. |
27 |
DISABLED_MODULE_LIST = [] |
27 |
pdm_env = "PYTHON_DISABLE_MODULES" |
|
|
28 |
if pdm_env in os.environ: |
29 |
DISABLED_MODULE_LIST = os.environ[pdm_env].split() |
30 |
else: |
31 |
DISABLED_MODULE_LIST = [] |
32 |
|
33 |
pds_env = "PYTHON_DISABLE_SSL" |
34 |
if pds_env in os.environ: |
35 |
disable_ssl = os.environ[pds_env] |
36 |
else: |
37 |
disable_ssl = 0 |
28 |
def get_platform(): |
38 |
def get_platform(): |
Lines 2189-2194
Link Here
|
2189 |
def detect_openssl_hashlib(self): |
2189 |
def detect_openssl_hashlib(self): |
2190 |
# Detect SSL support for the socket module (via _ssl) |
2190 |
# Detect SSL support for the socket module (via _ssl) |
|
|
2191 |
global disable_ssl |
2191 |
config_vars = sysconfig.get_config_vars() |
2192 |
config_vars = sysconfig.get_config_vars() |
2192 |
def split_var(name, sep): |
2193 |
def split_var(name, sep): |
Lines 2205-2211
Link Here
|
2205 |
openssl_includes = split_var('OPENSSL_INCLUDES', '-I') |
2206 |
openssl_includes = split_var('OPENSSL_INCLUDES', '-I') |
2206 |
openssl_libdirs = split_var('OPENSSL_LDFLAGS', '-L') |
2207 |
openssl_libdirs = split_var('OPENSSL_LDFLAGS', '-L') |
2207 |
openssl_libs = split_var('OPENSSL_LIBS', '-l') |
2208 |
openssl_libs = split_var('OPENSSL_LIBS', '-l') |
2208 |
if not openssl_libs: |
2209 |
if not openssl_libs or disable_ssl: |
2209 |
# libssl and libcrypto not found |
2210 |
# libssl and libcrypto not found |
2210 |
self.missing.extend(['_ssl', '_hashlib']) |
2211 |
self.missing.extend(['_ssl', '_hashlib']) |
2211 |
return None, None |
2212 |
return None, None |
Lines 2237-2247
Link Here
|
2237 |
else: |
2238 |
else: |
2238 |
self.missing.append('_ssl') |
2239 |
self.missing.append('_ssl') |
2239 |
self.add(Extension('_hashlib', ['_hashopenssl.c'], |
2240 |
if not disable_ssl: |
2240 |
depends=['hashlib.h'], |
2241 |
self.add(Extension('_hashlib', ['_hashopenssl.c'], |
2241 |
include_dirs=openssl_includes, |
2242 |
depends=['hashlib.h'], |
2242 |
library_dirs=openssl_libdirs, |
2243 |
include_dirs=openssl_includes, |
2243 |
libraries=openssl_libs)) |
2244 |
library_dirs=openssl_libdirs, |
|
|
2245 |
libraries=openssl_libs)) |
2244 |
def detect_hash_builtins(self): |
2246 |
def detect_hash_builtins(self): |
2245 |
# We always compile these even when OpenSSL is available (issue #14693). |
2247 |
# We always compile these even when OpenSSL is available (issue #14693). |
2246 |
- |
|
|