#!/usr/libexec/python3.13
# Launcher for the AWS CLI v2 with bundled Python 3.13 dependencies
import os
import sys

# AWSCLI2_LIBDIR exists so that the package %check section can run the
# launcher from the buildroot before the files are installed
sys.path.insert(0, os.environ.get("AWSCLI2_LIBDIR", "/usr/libexec/awscli2/lib"))

# Compatibility with macOS-style UTF-8 locales, from upstream bin/aws
if os.environ.get('LC_CTYPE', '') == 'UTF-8':
    os.environ['LC_CTYPE'] = 'en_US.UTF-8'

import awscli.clidriver

if __name__ == '__main__':
    sys.exit(awscli.clidriver.main())
