diff --git a/packages/@aws-cdk/aws-lambda-python-alpha/lib/packaging.ts b/packages/@aws-cdk/aws-lambda-python-alpha/lib/packaging.ts index 8bf8aaa6c036f..7875b3f15f83e 100644 --- a/packages/@aws-cdk/aws-lambda-python-alpha/lib/packaging.ts +++ b/packages/@aws-cdk/aws-lambda-python-alpha/lib/packaging.ts @@ -58,7 +58,7 @@ export class Packaging { dependenciesFile: DependenciesFile.PIPENV, // By default, pipenv creates a virtualenv in `/.local`, so we force it to create one in the package directory. // At the end, we remove the virtualenv to avoid creating a duplicate copy in the Lambda package. - exportCommand: `PIPENV_VENV_IN_PROJECT=1 pipenv lock -r > ${DependenciesFile.PIP} && rm -rf .venv`, + exportCommand: `PIPENV_VENV_IN_PROJECT=1 pipenv requirements > ${DependenciesFile.PIP} && rm -rf .venv`, }); } diff --git a/packages/@aws-cdk/aws-lambda-python-alpha/test/bundling.test.ts b/packages/@aws-cdk/aws-lambda-python-alpha/test/bundling.test.ts index 7a4d49bceecb3..a05fc4dab6834 100644 --- a/packages/@aws-cdk/aws-lambda-python-alpha/test/bundling.test.ts +++ b/packages/@aws-cdk/aws-lambda-python-alpha/test/bundling.test.ts @@ -193,7 +193,7 @@ test('Bundling a function with pipenv dependencies', () => { bundling: expect.objectContaining({ command: [ 'bash', '-c', - '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', + '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', ], }), })); @@ -221,7 +221,7 @@ test('Bundling a function with pipenv dependencies with assetExcludes', () => { bundling: expect.objectContaining({ command: [ 'bash', '-c', - "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", + "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", ], }), }));