CheckIncompatibleDependencies checks for incompatible dependencies using pip check.
(ctx *gcp.Context)
| 306 | } |
| 307 | |
| 308 | if err := compileBytecode(ctx, l.Path); err != nil { |
| 309 | return err |
| 310 | } |
| 311 | |
| 312 | return CheckIncompatibleDependencies(ctx) |
| 313 | } |
| 314 | |
| 315 | // CheckIncompatibleDependencies checks for incompatible dependencies using pip check. |
| 316 | func CheckIncompatibleDependencies(ctx *gcp.Context) error { |
| 317 | ctx.Logf("Checking for incompatible dependencies.") |
| 318 | result, err := ctx.Exec([]string{"python3", "-m", "pip", "check"}, gcp.WithUserAttribution) |
| 319 | if result == nil { |
| 320 | return fmt.Errorf("pip check: %w", err) |
| 321 | } |
| 322 | if result.ExitCode == 0 { |
| 323 | return nil |
| 324 | } |
| 325 | pyVer, err := Version(ctx) |
| 326 | if err != nil { |
| 327 | return err |
| 328 | } |
| 329 | // HACK: For backwards compatibility on App Engine and Cloud Functions Python 3.7 only report a |
| 330 | // warning. |
| 331 | if strings.HasPrefix(pyVer, "Python 3.7") { |
no test coverage detected