Ë
    ›¾j2  ã            
       ó|   — d dl mZ d dlmZmZ d dlmZmZ 	 ddedede	dee	   fd„Z
dedee   fd	„Zd
edede	fd„Zy)é    )ÚOptional)ÚInvalidSpecifierÚSpecifierSet)ÚInvalidVersionÚVersionÚversionÚ
constraintÚprereleasesÚreturnc                 ó    — |d   j                  «       rd|› �}	 t        |«      }t        | «      } ||_        | |v S # t        t        f$ r Y yw xY w)a  Check if a version (e.g. "2.0.0") is compatible given a version
    constraint (e.g. ">=1.9.0,<2.2.1"). If the constraint is a specific version,
    it's interpreted as =={version}.

    version (str): The version to check.
    constraint (str): The constraint string.
    prereleases (bool): Whether to allow prereleases. If set to False,
        prerelease versions will be considered incompatible.
    RETURNS (bool / None): Whether the version is compatible, or None if the
        version or constraint are invalid.
    r   z==N)Úisdigitr   r   r   r   r
   )r   r	   r
   Úspecs       ú^/home/spazio/kingdom_calls/work5/transenv/lib/python3.12/site-packages/weasel/util/versions.pyÚis_compatible_versionr      sf   € ð �!�}×ÑÔØ˜*˜Ð&ˆ
ðÜ˜JÓ'ˆÜ˜'Ó"ˆð #€DÔØ�dˆ?Ðøô œnÐ-ò Ùðús   š; »AÁAc                 óz   — 	 t        | «      }|j                  › d|j                  › �S # t        t        f$ r Y yw xY w)zºGet the major + minor version (without patch or prerelease identifiers).

    version (str): The version.
    RETURNS (str): The major + minor version or None if version is invalid.
    Nú.)r   Ú	TypeErrorr   ÚmajorÚminor)r   Úvs     r   Úget_minor_versionr   !   sE   € ðÜ�GÓˆð �g‰gˆY�a˜Ÿ™�yÐ!Ð!øô ”~Ð&ò Ùðús   ‚( ¨:¹:Ú	version_aÚ	version_bc                 óP   — t        | «      }t        |«      }|duxr |duxr ||k(  S )aN  Compare two versions and check if they match in major and minor, without
    patch or prerelease identifiers. Used internally for compatibility checks
    that should be insensitive to patch releases.

    version_a (str): The first version
    version_b (str): The second version.
    RETURNS (bool): Whether the versions match.
    N)r   )r   r   ÚaÚbs       r   Úis_minor_version_matchr   .   s4   € ô 	˜)Ó$€AÜ˜)Ó$€AØ�Dˆ=Ò5˜Q d˜]Ò5¨q°A©vÐ5ó    N)T)Útypingr   Úpackaging.specifiersr   r   Úpackaging.versionr   r   ÚstrÚboolr   r   r   © r   r   ú<module>r%      sm   ðÝ ç ?ß 5ð 8<ñØðØ!ðØ04ðàˆd�^óð4
"˜sð 
" x°¡}ó 
"ð6 cð 6°cð 6¸dô 6r   