in mysql-connector-python/cpydist/__init__.py [0:0]
def finalize_options(self):
"""Finalize the options."""
if self.debug:
self.log.setLevel(logging.DEBUG)
if set_threshold:
# Set setuptools logging level to DEBUG
try:
set_threshold(1)
except AttributeError:
pass
if not self.with_mysql_capi:
self.with_mysql_capi = os.environ.get("MYSQL_CAPI")
if not self.with_openssl_include_dir:
self.with_openssl_include_dir = os.environ.get("OPENSSL_INCLUDE_DIR")
if not self.with_openssl_lib_dir:
self.with_openssl_lib_dir = os.environ.get("OPENSSL_LIB_DIR")
if not self.extra_compile_args:
self.extra_compile_args = os.environ.get("EXTRA_COMPILE_ARGS")
if not self.extra_link_args:
self.extra_link_args = os.environ.get("EXTRA_LINK_ARGS")
if not self.skip_vendor:
self.skip_vendor = os.environ.get("SKIP_VENDOR", False)
if not self.with_mysql_capi:
self.skip_vendor = True
cmd_build_ext = self.distribution.get_command_obj("build_ext")
cmd_build_ext.with_mysql_capi = self.with_mysql_capi
cmd_build_ext.with_openssl_include_dir = self.with_openssl_include_dir
cmd_build_ext.with_openssl_lib_dir = self.with_openssl_lib_dir
cmd_build_ext.extra_compile_args = self.extra_compile_args
cmd_build_ext.extra_link_args = self.extra_link_args
cmd_build_ext.skip_vendor = self.skip_vendor
install = self.distribution.get_command_obj("install")
install.with_mysql_capi = self.with_mysql_capi
install.with_openssl_include_dir = self.with_openssl_include_dir
install.with_openssl_lib_dir = self.with_openssl_lib_dir
install.extra_compile_args = self.extra_compile_args
install.extra_link_args = self.extra_link_args
install.skip_vendor = self.skip_vendor
self.distribution.package_data = {"mysql.connector": ["py.typed"]}
if not cmd_build_ext.skip_vendor:
self._copy_vendor_libraries()