Skip to content

Commit 45233da

Browse files
authored
test(NODE-6745): only find python when installing native (#4422)
1 parent efea166 commit 45233da

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

.evergreen/config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -1534,6 +1534,11 @@ tasks:
15341534
- auth
15351535
- kerberos
15361536
commands:
1537+
- command: expansions.update
1538+
type: setup
1539+
params:
1540+
updates:
1541+
- {key: NATIVE, value: 'true'}
15371542
- func: install dependencies
15381543
- func: run kerberos tests
15391544
- name: test-auth-ldap

.evergreen/generate_evergreen_tasks.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,13 @@ TASKS.push(
162162
{
163163
name: 'test-auth-kerberos',
164164
tags: ['auth', 'kerberos'],
165-
commands: [{ func: 'install dependencies' }, { func: 'run kerberos tests' }]
165+
commands: [
166+
updateExpansions({
167+
NATIVE: 'true'
168+
}),
169+
{ func: 'install dependencies' },
170+
{ func: 'run kerberos tests' }
171+
]
166172
},
167173
{
168174
name: 'test-auth-ldap',

.evergreen/install-dependencies.sh

+7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ export NODE_LTS_VERSION=${NODE_LTS_VERSION:-16}
1111
# be handled by this script in drivers tools.
1212
source $DRIVERS_TOOLS/.evergreen/install-node.sh
1313

14+
if [ "$NATIVE" = "true" ]; then
15+
# https://github.com/nodejs/node-gyp#configuring-python-dependency
16+
. $DRIVERS_TOOLS/.evergreen/find-python3.sh
17+
NODE_GYP_FORCE_PYTHON=$(find_python3)
18+
export NODE_GYP_FORCE_PYTHON
19+
fi
20+
1421
npm install "${NPM_OPTIONS}"
1522

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

0 commit comments

Comments
 (0)