IsPyprojectEnabled checks if the pyproject feature is enabled.
(ctx *gcp.Context)
| 532 | } |
| 533 | if isBothPyprojectAndRequirementsPresent(ctx) { |
| 534 | return false // Prefer requirements.txt over pyproject.toml. |
| 535 | } |
| 536 | return true |
| 537 | } |
| 538 | |
| 539 | // IsPipPyproject checks if the application is a pip pyproject. |
| 540 | func IsPipPyproject(ctx *gcp.Context) bool { |
| 541 | return isPackageManagerConfigured(pip) && IsPyprojectEnabled(ctx) && (env.IsGCP() || env.IsGCF()) |
| 542 | } |
| 543 | |
| 544 | // PipInstallPyproject installs dependencies from a pyproject.toml file in the current directory. |
| 545 | func PipInstallPyproject(ctx *gcp.Context, l *libcnb.Layer) error { |
| 546 | ctx.Logf("Installing application dependencies from pyproject.toml.") |