projen / projen

Rapidly build modern applications with advanced configuration management
https://projen.io
Apache License 2.0
2.53k stars 362 forks source link

PythonProject calls `installDependencies` indiscriminately #3654

Open moltar opened 1 week ago

moltar commented 1 week ago

PythonProject calls installDependencies all the time during synth, regardless of whether something has changed.

It is really wasteful and time-consuming to install deps on every projen synth run.

Shall it perhaps check if any dep declarations have changed? For example, maybe check the requirements*.txt file for changes.

It is called here: https://github.com/projen/projen/blob/611c5b48f76b0295aa003a7c14bcf758bef0a50f/src/python/python-project.ts#L550

mrgrain commented 1 week ago

Yeah, it should have a similar check like the node project:

https://github.com/projen/projen/blob/611c5b48f76b0295aa003a7c14bcf758bef0a50f/src/javascript/node-package.ts#L889-L906