Skip to content

Commit

Permalink
test(NODE-6745): only find python when installing native (#4422)
Browse files Browse the repository at this point in the history
  • Loading branch information
durran authored Feb 18, 2025
1 parent efea166 commit 45233da
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1534,6 +1534,11 @@ tasks:
- auth
- kerberos
commands:
- command: expansions.update
type: setup
params:
updates:
- {key: NATIVE, value: 'true'}
- func: install dependencies
- func: run kerberos tests
- name: test-auth-ldap
Expand Down
8 changes: 7 additions & 1 deletion .evergreen/generate_evergreen_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,13 @@ TASKS.push(
{
name: 'test-auth-kerberos',
tags: ['auth', 'kerberos'],
commands: [{ func: 'install dependencies' }, { func: 'run kerberos tests' }]
commands: [
updateExpansions({
NATIVE: 'true'
}),
{ func: 'install dependencies' },
{ func: 'run kerberos tests' }
]
},
{
name: 'test-auth-ldap',
Expand Down
7 changes: 7 additions & 0 deletions .evergreen/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ export NODE_LTS_VERSION=${NODE_LTS_VERSION:-16}
# be handled by this script in drivers tools.
source $DRIVERS_TOOLS/.evergreen/install-node.sh

if [ "$NATIVE" = "true" ]; then
# https://github.com/nodejs/node-gyp#configuring-python-dependency
. $DRIVERS_TOOLS/.evergreen/find-python3.sh
NODE_GYP_FORCE_PYTHON=$(find_python3)
export NODE_GYP_FORCE_PYTHON
fi

npm install "${NPM_OPTIONS}"

source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh

0 comments on commit 45233da

Please sign in to comment.