diff --git a/setup.py b/setup.py index cb0d33a5f..bd639846b 100644 --- a/setup.py +++ b/setup.py @@ -47,6 +47,8 @@ WINDOWS = 'Windows' in PLATFORM CWD = os.path.abspath(os.path.dirname(__file__)) +STATIC_SSL = os.getenv('STATIC_SSL') +SSL_LIB_PATH = os.getenv('SSL_LIB_PATH') # COVERAGE environment variable only meant for CI/CD workflow to generate C coverage data # Not for developers to use, unless you know what the workflow is doing! COVERAGE = os.getenv('COVERAGE') @@ -119,6 +121,13 @@ # STATIC SSL LINKING BUILD SETTINGS ################################################################################ +if STATIC_SSL: + extra_objects.extend( + [SSL_LIB_PATH + 'libssl.a', SSL_LIB_PATH + 'libcrypto.a']) + libraries.remove('ssl') + libraries.remove('crypto') + library_dirs.remove('/usr/local/opt/openssl/lib') + ################################################################################ # PLATFORM SPECIFIC BUILD SETTINGS ################################################################################ @@ -172,6 +181,9 @@ # Needed for linking the Python client with the C client extra_objects.append(AEROSPIKE_C_TARGET + "/vs/x64/Release/aerospike.lib") +os.putenv('CPATH', ':'.join(include_dirs)) +os.environ['CPATH'] = ':'.join(include_dirs) + ################################################################################ # SETUP ################################################################################