Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer rely on system Python for installs of python3 runtime #93

Merged
merged 3 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ implemented are:
* `nodejs14.x` for Node.js Lambda functions using a downloaded Node v14.18.1 binary
* `python` for Python Lambda functions using the system `python` binary
* `python2.7` for Python Lambda functions using a downloaded Python v2.7.12 binary
* `python3` for Python Lambda functions using the system `python3` binary (or fallback to `python`)
* `python3` for Python Lambda functions using the system `python3` binary
* `python3.6` for Python Lambda functions using a downloaded Python v3.6.8 binary
* `python3.7` for Python Lambda functions using a downloaded Python v3.7.2 binary
* `go1.x` for Lambda functions written in Go - binary must be compiled for your platform
Expand Down
8 changes: 6 additions & 2 deletions src/runtimes/python3/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { Runtime } from '../../types';
import { installPython } from '../../install-python';
import { runtimes, initializeRuntime } from '../../runtimes';

export async function init(_runtime: Runtime): Promise<void> {
await initializeRuntime(runtimes.python);
export async function init({ cacheDir }: Runtime): Promise<void> {
await Promise.all([
initializeRuntime(runtimes.python),
installPython(cacheDir, '3.6.8')
]);
}
2 changes: 1 addition & 1 deletion test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ it(
}),
async fn => {
const payload = await fn();
assert.equal(payload['platform.python_version'][0], '3');
assert.equal(payload['platform.python_version'], '3.6.8');
}
)
);
Expand Down