explicit#

Define explicit spec.

Classes#

ExplicitSpec

The ExplicitSpec class handles explicit environment files. These are ones

class ExplicitSpec(filename: str | None = None, **kwargs)#

Bases: conda.plugins.types.EnvironmentSpecBase

The ExplicitSpec class handles explicit environment files. These are ones which are marked with the @EXPLICIT marker.

Initialize the explicit specification.

Parameters:
  • filename -- Path to the requirements file

  • kwargs -- Additional arguments

property env: conda.models.environment.Environment#

Build an environment from the explicit file.

Returns:

An Environment object containing the package specifications

Raises:

ValueError -- If the file cannot be read

can_handle() bool#

Validates that this spec can process the environment definition. This checks if:

  • a filename was provided

  • the file has the "@EXPLICIT" marker

Returns:

True if the file can be handled, False otherwise