brave-hair-402
04/02/2023, 10:12 AMvenv_site_packages_copies=True
to the pex_binary config fixes the issue.happy-kitchen-89482
04/02/2023, 12:55 PMacoustic-garden-40182
04/03/2023, 8:45 AMbrave-hair-402
04/03/2023, 9:52 AMpython_sources()
resources(name="cdk_file", sources=["cdk.json"])
pex_binary(
name="my_services-cdk",
entry_point="app.py",
execution_mode="venv",
venv_site_packages_copies=True,
dependencies=[":cdk_file"],
)
and then I run something like this in my CI/CD pipeline:
- cd dist/src.my_services
- unzip -p my_services-cdk.pex my_services/cdk.json > cdk.json
- cdk deploy
I also had to change this line in cdk.json:
"app": "./my_services-cdk.pex",
acoustic-garden-40182
04/03/2023, 10:18 AMbrave-hair-402
04/03/2023, 10:59 AMacoustic-garden-40182
04/03/2023, 11:13 AM