Skip to content

Commit f85f486

Browse files
fix(lambda-python-alpha): pipenv lock -r is no longer supported (#28317)
As part of the pipenv release 2022.8.13 the deprecated way of generating requirements ("pipenv install -r" or "pipenv lock -r") has been removed in favor of the "pipenv requirements" command. See #28015 for the motivation behind this change. * [Reference to pipenv CHANGELOG](https://github.com/pypa/pipenv/blob/main/CHANGELOG.md#2022813-2022-08-13) * [Refernce to relevant pipenv pull request](pypa/pipenv#5200) Closes #28015 . ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 0e30fcc commit f85f486

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/@aws-cdk/aws-lambda-python-alpha/lib/packaging.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class Packaging {
5858
dependenciesFile: DependenciesFile.PIPENV,
5959
// By default, pipenv creates a virtualenv in `/.local`, so we force it to create one in the package directory.
6060
// At the end, we remove the virtualenv to avoid creating a duplicate copy in the Lambda package.
61-
exportCommand: `PIPENV_VENV_IN_PROJECT=1 pipenv lock -r > ${DependenciesFile.PIP} && rm -rf .venv`,
61+
exportCommand: `PIPENV_VENV_IN_PROJECT=1 pipenv requirements > ${DependenciesFile.PIP} && rm -rf .venv`,
6262
});
6363
}
6464

packages/@aws-cdk/aws-lambda-python-alpha/test/bundling.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ test('Bundling a function with pipenv dependencies', () => {
193193
bundling: expect.objectContaining({
194194
command: [
195195
'bash', '-c',
196-
'rsync -rLv /asset-input/ /asset-output/python && cd /asset-output/python && PIPENV_VENV_IN_PROJECT=1 pipenv lock -r > requirements.txt && rm -rf .venv && python -m pip install -r requirements.txt -t /asset-output/python',
196+
'rsync -rLv /asset-input/ /asset-output/python && cd /asset-output/python && PIPENV_VENV_IN_PROJECT=1 pipenv requirements > requirements.txt && rm -rf .venv && python -m pip install -r requirements.txt -t /asset-output/python',
197197
],
198198
}),
199199
}));
@@ -221,7 +221,7 @@ test('Bundling a function with pipenv dependencies with assetExcludes', () => {
221221
bundling: expect.objectContaining({
222222
command: [
223223
'bash', '-c',
224-
"rsync -rLv --exclude='.ignorefile' /asset-input/ /asset-output/python && cd /asset-output/python && PIPENV_VENV_IN_PROJECT=1 pipenv lock -r > requirements.txt && rm -rf .venv && python -m pip install -r requirements.txt -t /asset-output/python",
224+
"rsync -rLv --exclude='.ignorefile' /asset-input/ /asset-output/python && cd /asset-output/python && PIPENV_VENV_IN_PROJECT=1 pipenv requirements > requirements.txt && rm -rf .venv && python -m pip install -r requirements.txt -t /asset-output/python",
225225
],
226226
}),
227227
}));

0 commit comments

Comments
 (0)