
    si                    ~    S r SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SSKJr  SS	KJr  SS
KJr   " S S\5      rg)zDefine explicit spec.    )annotations   )EXPLICIT_MARKER)context)CondaValueError)yield_lines)!get_package_records_from_explicit)Environment)EnvironmentSpecBasec                  D    \ rS rSrSrSS	S jjrS
S jr\SS j5       rSr	g)ExplicitSpec   zw
The ExplicitSpec class handles explicit environment files. These are ones
which are marked with the @EXPLICIT marker.
Nc                    Xl         g)z{Initialize the explicit specification.

:param filename: Path to the requirements file
:param kwargs: Additional arguments
Nfilename)selfr   kwargss      8lib/python3.13/site-packages/conda/env/specs/explicit.py__init__ExplicitSpec.__init__   s	     !    c                r    U R                   c  g[        [        U R                   5      5      n[        U;   a  gg)z
Validates that this spec can process the environment definition.
This checks if:
    * a filename was provided
    * the file has the "@EXPLICIT" marker

:return: True if the file can be handled, False otherwise
FT)r   listr   r   )r   dependencies_lists     r   
can_handleExplicitSpec.can_handle   s6     ==  !T]]!;<//r   c                    U R                   (       d  [        S5      e[        [        U R                   5      5      n[	        U5      n[        [        R                  US9$ )z
Build an environment from the explicit file.

:return: An Environment object containing the package specifications
:raises ValueError: If the file cannot be read
zNo filename provided)platformexplicit_packages)r   r   r   r   r	   r
   r   subdir)r   r   r   s      r   envExplicitSpec.env2   sP     }}!"899 !T]]!;<=>OP^^/
 	
r   r   )N)r   z
str | NonereturnNone)r#   bool)r#   r
   )
__name__
__module____qualname____firstlineno____doc__r   r   propertyr!   __static_attributes__ r   r   r   r      s%    
!( 
 
r   r   N)r*   
__future__r   base.constantsr   base.contextr   
exceptionsr   gateways.disk.readr   miscr	   models.environmentr
   plugins.typesr   r   r-   r   r   <module>r6      s/     " - # ) - 5 - 04
& 4
r   