PYTHON-5298 Update lock file and clean up dependency installation (#2317)

This commit is contained in:
Steven Silvester 2025-04-28 13:59:36 -05:00 committed by GitHub
parent 9a2f5678de
commit 02c3df6fc9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 12 deletions

View File

@ -96,7 +96,7 @@ EOT
_bin_path=""
if [ "Windows_NT" == "${OS:-}" ]; then
_bin_path="/cygdrive/c/Python/Current/Scripts"
elif [ "$(uname -s)" != "Darwin" ]; then
elif [ "$(uname -s)" == "Darwin" ]; then
_bin_path="/Library/Frameworks/Python.Framework/Versions/Current/bin"
else
_bin_path="/opt/python/Current/bin"
@ -106,6 +106,7 @@ if [ -d "${_bin_path}" ]; then
if [ "Windows_NT" == "${OS:-}" ]; then
_suffix=".exe"
fi
echo "Symlinking binaries from toolchain"
mkdir -p $PYMONGO_BIN_DIR
ln -s ${_bin_path}/just${_suffix} $PYMONGO_BIN_DIR/just${_suffix}
ln -s ${_bin_path}/uv${_suffix} $PYMONGO_BIN_DIR/uv${_suffix}

View File

@ -10,9 +10,6 @@ if [ -f $HERE/env.sh ]; then
. $HERE/env.sh
fi
_BIN_DIR=${PYMONGO_BIN_DIR:-$HOME/.local/bin}
export PATH="$PATH:${_BIN_DIR}"
# Helper function to pip install a dependency using a temporary python env.
function _pip_install() {
_HERE=$(dirname ${BASH_SOURCE:-$0})
@ -28,23 +25,27 @@ function _pip_install() {
if [ "Windows_NT" = "${OS:-}" ]; then
_suffix=".exe"
fi
ln -s "$(which $2)" $_BIN_DIR/${2}${_suffix}
ln -s "$(which $2)" $PYMONGO_BIN_DIR/${2}${_suffix}
# uv also comes with a uvx binary.
if [ $2 == "uv" ]; then
ln -s "$(which uvx)" $_BIN_DIR/uvx${_suffix}
ln -s "$(which uvx)" $PYMONGO_BIN_DIR/uvx${_suffix}
fi
echo "Installed to ${_BIN_DIR}"
echo "Installed to ${PYMONGO_BIN_DIR}"
echo "Installing $2 using pip... done."
}
# Ensure just is installed.
if ! command -v just >/dev/null 2>&1; then
if ! command -v just &>/dev/null; then
# On most systems we can install directly.
_TARGET=""
if [ "Windows_NT" = "${OS:-}" ]; then
_TARGET="--target x86_64-pc-windows-msvc"
fi
if [ -z "${PYMONGO_BIN_DIR:-}" ]; then
echo "Please install just!"
exit 1
fi
_BIN_DIR=$PYMONGO_BIN_DIR
echo "Installing just..."
mkdir -p "$_BIN_DIR" 2>/dev/null || true
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- $_TARGET --to "$_BIN_DIR" || {
@ -53,8 +54,13 @@ if ! command -v just >/dev/null 2>&1; then
echo "Installing just... done."
fi
# Install uv.
if ! command -v uv >/dev/null 2>&1; then
# Ensure uv is installed.
if ! command -v uv &>/dev/null; then
if [ -z "${PYMONGO_BIN_DIR:-}" ]; then
echo "Please install uv!"
exit 1
fi
_BIN_DIR=$PYMONGO_BIN_DIR
echo "Installing uv..."
# On most systems we can install directly.
curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="$_BIN_DIR" INSTALLER_NO_MODIFY_PATH=1 sh || {

1
uv.lock generated
View File

@ -998,7 +998,6 @@ sdist = { url = "https://files.pythonhosted.org/packages/07/e9/ae44ea7d7605df9e5
[[package]]
name = "pymongo"
version = "4.13.0.dev0"
source = { editable = "." }
dependencies = [
{ name = "dnspython" },