#!/bin/sh

# Copyright 2019-Present Couchbase, Inc.
#
# Use of this software is governed by the Business Source License included in
# the file licenses/BSL-Couchbase.txt.  As of the Change Date specified in that
# file, in accordance with the Business Source License, use of this software
# will be governed by the Apache License, Version 2.0, included in the file
# licenses/APL2.txt.

D0=$(cd "$(dirname "$0")" && pwd)
codedir=$(cd "$D0/../lib/python" && pwd)
libdir=$(cd "$D0/../lib" && pwd)
pydir=$(cd "$D0/../lib/python/interp" && pwd)

PYTHONPATH="$codedir"
export PYTHONPATH
DYLD_LIBRARY_PATH="$pydir/lib:$libdir"
export DYLD_LIBRARY_PATH

exec "$pydir"/bin/python3 -s "$codedir"/$(basename "$0") "$@"
