Get all the needed information from the module's metadata and source files
(ctx context.Context, modSource *dagger.ModuleSource)
| 242 | |
| 243 | // Get all the needed information from the module's metadata and source files |
| 244 | func (m *PythonSdk) Load(ctx context.Context, modSource *dagger.ModuleSource) (*PythonSdk, error) { |
| 245 | m.ModSource = modSource |
| 246 | m.ContextDir = modSource.ContextDirectory() |
| 247 | debug, err := modSource.SDK().Debug(ctx) |
| 248 | if err != nil { |
| 249 | return nil, fmt.Errorf("runtime module load: %w", err) |
| 250 | } |
| 251 | m.Debug = debug |
| 252 | |
| 253 | if err := m.Discovery.Load(ctx, m); err != nil { |
| 254 | return nil, fmt.Errorf("runtime module load: %w", err) |
| 255 | } |
| 256 | |
| 257 | return m, nil |
| 258 | } |
| 259 | |
| 260 | // Initialize the base Python container |
| 261 | // |
no test coverage detected