+
    ,ja                    2    ^ RI Ht ^ RIHt  ! R R4      tR# )    )annotations)PyPackageNamec                      ] tR t^tR R lt]R R l4       t]R R l4       t]R R l4       t]	R	 R
 l4       t
]R R l4       t]R R l4       tR R ltR R ltR R ltR R ltRtR# )PackageNamec                    V ^8  d   QhRRRR/# )   sourcestrreturnNone )formats   "<lib/python3.14/site-packages/rattler/package/package_name.py__annotate__PackageName.__annotate__   s     + +s +t +    c                	    \        V\        4      '       g$   \        R \        V4      P                  : R24      h\        V4      V n        R# )z3PackageName constructor received unsupported type  z for the `source` parameterN)
isinstancer
   	TypeErrortype__name__r   _name)selfr	   s   &&r   __init__PackageName.__init__   sH    &#&&L)),,GI  #6*
r   c                    V ^8  d   QhRRRR/# )r   
normalizedr
   r   r   r   )r   s   "r   r   r      s     Z Zc Zk Zr   c                T    \         P                  \        P                  ! V 4      4      # )a  
Constructs a new `PackageName` from a string without checking if the string is actually a
valid or normalized conda package name. This should only be used if you are sure that the
input string is valid.

Examples
--------
```python
>>> p = PackageName.unchecked("test_xyz")
>>>
```
)r   _from_py_package_namer   new_unchecked)r   s   &r   	uncheckedPackageName.unchecked   s      001L1LZ1XYYr   c                    V ^8  d   QhRRRR/# r   specr
   r   r   r   )r   s   "r   r   r       s     Y Y Y Yr   c                T    \         P                  \        P                  ! V 4      4      # )a  
Parses the package name part from a matchspec string without parsing the entire matchspec.

This extracts the package name by splitting on whitespace or version constraint characters
(`>`, `<`, `=`, `!`, `~`, `;`).

Examples
--------
```python
>>> p = PackageName.from_matchspec_str("numpy>=1.0,<2.0")
>>> p.source
'numpy'
>>> p = PackageName.from_matchspec_str("pillow >=10")
>>> p.source
'pillow'
>>>
```
)r   r   r   from_matchspec_strr%   s   &r   r'   PackageName.from_matchspec_str   s!    ( 001Q1QRV1WXXr   c                    V ^8  d   QhRRRR/# r$   r   )r   s   "r   r   r   6   s     c c3 c; cr   c                T    \         P                  \        P                  ! V 4      4      # )a  
Parses the package name part from a matchspec string without parsing the entire matchspec.
This function assumes the matchspec string is a valid matchspec.

This extracts the package name by splitting on whitespace or version constraint characters
(`>`, `<`, `=`, `!`, `~`, `;`). The original capitalization is preserved in the source,
while the normalized version is lowercase.

Examples
--------
```python
>>> p = PackageName.from_matchspec_str_unchecked("Pillow >=10")
>>> p.source
'Pillow'
>>> p.normalized
'pillow'
>>>
```
)r   r   r   from_matchspec_str_uncheckedr(   s   &r   r,   (PackageName.from_matchspec_str_unchecked5   s!    * 001[1[\`1abbr   c                    V ^8  d   QhRRRR/# )r   py_package_namer   r   r   r   )r   s   "r   r   r   M   s      M k r   c                4    V P                  V 4      pWn        V# )z<Construct Rattler PackageName from FFI PyPackageName object.)__new__r   )clsr/   package_names   && r   r   !PackageName._from_py_package_nameL   s     {{3',r   c                   V ^8  d   QhRR/# r   r   r
   r   )r   s   "r   r   r   T   s     ! ! !r   c                .    V P                   P                  # )z
Returns the source representation of the package name.
This is the string from which this instance was created.

Examples
--------
```python
>>> p = PackageName("test-xyz")
>>> p.source
'test-xyz'
>>>
```
)r   r	   r   s   &r   r	   PackageName.sourceS   s     zz   r   c                   V ^8  d   QhRR/# r6   r   )r   s   "r   r   r   e   s     % %C %r   c                .    V P                   P                  # )z
Returns the normalized version of the package name.
The normalized string is guaranteed to be a valid conda package name.

Examples
--------
```python
>>> p = PackageName("test-xyz")
>>> p.normalized
'test-xyz'
>>>
```
)r   r   r8   s   &r   r   PackageName.normalizedd   s     zz$$$r   c                   V ^8  d   QhRR/# )r   r   intr   )r   s   "r   r   r   u   s     % %# %r   c                6    V P                   P                  4       # )a#  
Computes the hash of this instance.

Examples
--------
```python
>>> hash(PackageName("test-abc")) == hash(PackageName("test-abc"))
True
>>> hash(PackageName("test-abc")) == hash(PackageName("test-ABC"))
True
>>> hash(PackageName("test-abc")) == hash(PackageName("abc-test"))
False
>>>
```
)r   __hash__r8   s   &r   r@   PackageName.__hash__u   s      zz""$$r   c                    V ^8  d   QhRRRR/# r   otherobjectr   boolr   )r   s   "r   r   r           ) )F )t )r   c                    \        V\        4      '       d   V P                  \        V4      8H  # \        V\        4      '       g   R# V P                  VP                  8H  # )a  
Returns True if this instance represents the same PackageName as `other`.

Examples
--------
```python
>>> PackageName("test-abc") == PackageName("abc-test")
False
>>> PackageName("test-abc") == PackageName("test-abc")
True
>>> PackageName("test-abc") == PackageName("test-ABC")
True
>>> PackageName("test-abc") == "test-abc"
True
>>> PackageName("test-abc") == "not-test-abc"
False
>>>
```
Fr   r
   r   r   r   r   rD   s   &&r   __eq__PackageName.__eq__   sH    ( eS!!::u!555%--zzU[[((r   c                    V ^8  d   QhRRRR/# rC   r   )r   s   "r   r   r      rG   r   c                    \        V\        4      '       d   V P                  \        V4      8g  # \        V\        4      '       g   R# V P                  VP                  8g  # )a  
Returns True if this instance does not represents the same PackageName as `other`.

Examples
--------
```python
>>> PackageName("test-abc") != PackageName("test-abc")
False
>>> PackageName("test-abc") != PackageName("test-ABC")
False
>>> PackageName("test-abc") != PackageName("abc-test")
True
>>> PackageName("test-abc") != "test-abc"
False
>>> PackageName("test-abc") != "not-test-abc"
True
>>>
```
TrI   rJ   s   &&r   __ne__PackageName.__ne__   sH    ( eS!!::u!555%--zzU[[((r   c                   V ^8  d   QhRR/# r6   r   )r   s   "r   r   r      s     / /# /r   c                "    RV P                    R2# )z
Returns a representation of the PackageName.

Examples
--------
```python
>>> p = PackageName("test-xyz")
>>> p
PackageName("test-xyz")
>>>
```
zPackageName("z"))r	   r8   s   &r   __repr__PackageName.__repr__   s     t{{m2..r   )r   N)r   
__module____qualname____firstlineno__r   staticmethodr!   r'   r,   classmethodr   propertyr	   r   r@   rK   rO   rS   __static_attributes__r   r   r   r   r      s    + Z Z Y Y* c c,   ! !  % % %$)8)8/ /r   r   N)
__future__r   rattler.rattlerr   r   r   r   r   <module>r^      s    " )F/ F/r   