+
    ,jY2                        ^ RI Ht ^ RIt^ RIt^ RIHt ^ RIHtHtH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ RIHt ]'       d   ^ R	IHt  ! R
 R4      tR# )    )annotationsN)Path)TYPE_CHECKINGListOptional)PackageName)PyIndexJson)Version)VersionWithSource)Clientc                  H   ] tR t^t$ R]R&   ]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4       t]P                  R R l4       t]R R l4       t]P                  R R l4       t]R R l4       t]P                  R R l4       t]R R l4       t]P                  R R l4       t]R R  l4       t]P                  R! R" l4       t]R# R$ l4       t]P                  R% R& l4       t]R' R( l4       t]P                  R) R* l4       t]R+ R, l4       t]P                  R- R. l4       t]R/ R0 l4       t]P                  R1 R2 l4       t]R3 R4 l4       t]P                  R5 R6 l4       t]R7 R8 l4       t]P                  R9 R: l4       t]R; R< l4       t]P                  R= R> l4       t]R? R@ l4       t]P                  RA RB l4       t]RC RD l4       t]P                  RE RF l4       t]
RG RH l4       tRI RJ ltRKtRL# )M	IndexJsonr	   _innerc                    V ^8  d   QhRRRR/#    pathzos.PathLike[str]returnr    )formats   ":lib/python3.14/site-packages/rattler/package/index_json.py__annotate__IndexJson.__annotate__   s     J J( JY J    c                T    \         P                  \        P                  ! V 4      4      # )z
Parses an `index.json` file pointed to by the path.

Examples
--------
```python
>>> idx_json = IndexJson.from_path(
...     "../test-data/conda-22.11.1-py38haa244fe_1-index.json"
... )
>>> idx_json
IndexJson()
>>>
```
)r   _from_py_index_jsonr	   	from_pathr   s   &r   r   IndexJson.from_path   s       ,,[-B-B4-HIIr   c                    V ^8  d   QhRRRR/# r   r   )r   s   "r   r   r   &   s     U U#3 U	 Ur   c                T    \         P                  \        P                  ! V 4      4      # )z
Parses the package file from archive.
Note: If you want to extract multiple `info/*` files then this will be slightly
      slower than manually iterating over the archive entries with
      custom logic as this skips over the rest of the archive
)r   r   r	   from_package_archiver   s   &r   r"   IndexJson.from_package_archive%   s      ,,[-M-Md-STTr   c                    V ^8  d   QhRRRR/# r   r   )r   s   "r   r   r   0   s     ] ]%5 ]) ]r   c                f    \         P                  \        P                  ! \	        V 4      4      4      # )a  
Parses the object by looking up the appropriate file from the root of the
specified Conda archive directory, using a format appropriate for the file
type.

For example, if the file is in JSON format, this function reads the
appropriate file from the archive, parse the JSON string and return the
resulting object. If the file is not in a parsable format or if the file
could not be read, this function returns an error.
)r   r   r	   from_package_directoryr   r   s   &r   r&    IndexJson.from_package_directory/   s'     ,,[-O-OPTUYPZ-[\\r   c                    V ^8  d   QhRRRR/# )r   stringstrr   r   r   )r   s   "r   r   r   >   s     	K 	K 	K 	Kr   c                T    \         P                  \        P                  ! V 4      4      # )a  
Parses the object from a string, using a format appropriate for the file
type.

For example, if the file is in JSON format, this function parses the JSON
string and returns the resulting object. If the file is not in a parsable
format, this function returns an error.
)r   r   r	   from_str)r)   s   &r   r,   IndexJson.from_str=   s      ,,[-A-A&-IJJr   c               $    V ^8  d   QhRRRRRR/# )r   clientr   urlr*   r   zOptional[IndexJson]r   )r   s   "r   r   r   J   s"     6 66 6 6@S 6r   c                   "   \         P                  ! VP                  V4      G Rj  xL
 pVf   R# V P                  V4      #  L5i)z>
Fetches `info/index.json` from a remote package archive URL.
N)r	   from_remote_url_clientr   )clsr/   r0   py_index_jsons   &&& r   r2   IndexJson.from_remote_urlI   s@     
 *99&..#NN &&}55 Os   %AAAc                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   T   s     * *$ *r   c                 ,    \         P                  ! 4       # )z
Returns the path to the file within the Conda archive.

The path is relative to the root of the archive and includes any necessary
directories.
)r	   package_pathr   r   r   r9   IndexJson.package_pathS   s     ''))r   c                   V ^8  d   QhRR/# )r   r   r
   r   )r   s   "r   r   r   ^   s     C C Cr   c                ^    V P                   P                  w  r\        P                  ! W4      # )as  
The version of the package.

Examples
--------
```python
>>> idx_json = IndexJson.from_path(
...     "../test-data/conda-22.11.1-py38haa244fe_1-index.json"
... )
>>> idx_json.version
VersionWithSource(version="22.11.1", source="22.11.1")
>>> idx_json.version = VersionWithSource("1.02.3")
>>> idx_json.version
VersionWithSource(version="1.2.3", source="1.02.3")
>>>
```
)r   versionr   _from_py_version)selfr=   sources   &  r   r=   IndexJson.version]   s&    & ++-- 11'BBr   c                    V ^8  d   QhRRRR/# )r   valuer   r   Noner   )r   s   "r   r   r   t   s     > >. >4 >r   c                	T    VP                   VP                  3V P                  n        R # N)_version_sourcer   r=   r?   rC   s   &&r   r=   rA   s   s    $~~u}}=r   c                   V ^8  d   QhRR/# r   r   Optional[str]r   )r   s   "r   r   r   x   s      m r   c                F    V P                   P                  ;p'       d   V# R# )z
Optionally, the architecture the package is build for.

Examples
--------
```python
>>> idx_json = IndexJson.from_path(
...     "../test-data/conda-22.11.1-py38haa244fe_1-index.json"
... )
>>> idx_json.arch
'x86_64'
>>>
```
Nr   arch)r?   rO   s   & r   rO   IndexJson.archw   s!      ;;###4#Kr   c                    V ^8  d   QhRRRR/# r   rC   rL   r   rD   r   )r   s   "r   r   r      s     ! !- !D !r   c                	&    WP                   n        R # rF   rN   rI   s   &&r   rO   rP      s     r   c                   V ^8  d   QhRR/# r   r   r*   r   )r   s   "r   r   r      s     ! !s !r   c                .    V P                   P                  # )z
The build string of the package.

Examples
--------
```python
>>> idx_json = IndexJson.from_path(
...     "../test-data/conda-22.11.1-py38haa244fe_1-index.json"
... )
>>> idx_json.build
'py38haa244fe_1'
>>>
```
r   buildr?   s   &r   rX   IndexJson.build   s      {{   r   c                    V ^8  d   QhRRRR/# )r   rC   r*   r   rD   r   )r   s   "r   r   r      s     " "3 "4 "r   c                	&    WP                   n        R # rF   rW   rI   s   &&r   rX   rZ      s    !r   c                   V ^8  d   QhRR/# )r   r   intr   )r   s   "r   r   r      s     ( (c (r   c                .    V P                   P                  # )z
The build number of the package.
This is also included in the build string.

Examples
--------
```python
>>> idx_json = IndexJson.from_path(
...     "../test-data/conda-22.11.1-py38haa244fe_1-index.json"
... )
>>> idx_json.build_number
1
>>>
```
r   build_numberrY   s   &r   ra   IndexJson.build_number   s    " {{'''r   c                    V ^8  d   QhRRRR/# )r   rC   r^   r   rD   r   )r   s   "r   r   r      s     ) )# )$ )r   c                	&    WP                   n        R # rF   r`   rI   s   &&r   ra   rb      s    #( r   c                   V ^8  d   QhRR/# r   r   	List[str]r   )r   s   "r   r   r      s     & &I &r   c                .    V P                   P                  # )a/  
The package constraints of the package.

Examples
--------
```python
>>> idx_json = IndexJson.from_path(
...     "../test-data/conda-22.11.1-py38haa244fe_1-index.json"
... )
>>> idx_json.constrains # doctest: +ELLIPSIS
['conda-content-trust >=0.1.1', ..., 'conda-env >=2.6', 'conda-build >=3']
>>>
```
r   
constrainsrY   s   &r   rj   IndexJson.constrains   s      {{%%%r   c                    V ^8  d   QhRRRR/# r   rC   rg   r   rD   r   )r   s   "r   r   r      s     ' '	 'd 'r   c                	&    WP                   n        R # rF   ri   rI   s   &&r   rj   rk      s    !&r   c                   V ^8  d   QhRR/# rf   r   )r   s   "r   r   r      s     # # #r   c                .    V P                   P                  # )a  
The dependencies of the package.

Examples
--------
```python
>>> idx_json = IndexJson.from_path(
...     "../test-data/conda-22.11.1-py38haa244fe_1-index.json"
... )
>>> idx_json.depends # doctest: +ELLIPSIS
['conda-package-handling >=1.3.0', ..., 'tqdm >=4']
>>>
```
)r   dependsrY   s   &r   rq   IndexJson.depends   s      {{"""r   c                    V ^8  d   QhRRRR/# rm   r   )r   s   "r   r   r      s     ' 'Y '4 'r   c                	<    V P                   P                  V4       R # rF   )r   set_dependsrI   s   &&r   rq   rr          &r   c                   V ^8  d   QhRR/# rK   r   )r   s   "r   r   r      s      - r   c                F    V P                   P                  ;p'       d   V# R# )a  
Features are a deprecated way to specify different feature sets for the conda solver. This is not
supported anymore and should not be used. Instead, `mutex` packages should be used to specify
mutually exclusive features.

Examples
--------
```python
>>> idx_json = IndexJson.from_path(
...     "../test-data/conda-22.11.1-py38haa244fe_1-index.json"
... )
>>> idx_json.features
>>>
```
N)r   features)r?   ry   s   & r   ry   IndexJson.features   s!    " {{+++8+Or   c                    V ^8  d   QhRRRR/# rR   r   )r   s   "r   r   r           ( (m ( (r   c                	<    V P                   P                  V4       R # rF   )r   set_featuresrI   s   &&r   ry   rz            'r   c                   V ^8  d   QhRR/# rK   r   )r   s   "r   r   r     s       r   c                F    V P                   P                  ;p'       d   V# R# )z
Optionally, the license.

Examples
--------
```python
>>> idx_json = IndexJson.from_path(
...     "../test-data/conda-22.11.1-py38haa244fe_1-index.json"
... )
>>> idx_json.license
'BSD-3-Clause'
>>>
```
N)r   license)r?   r   s   & r   r   IndexJson.license  s!      kk)))7)Nr   c                    V ^8  d   QhRRRR/# rR   r   )r   s   "r   r   r     s     ' '] 't 'r   c                	<    V P                   P                  V4       R # rF   )r   set_licenserI   s   &&r   r   r     rv   r   c                   V ^8  d   QhRR/# rK   r   )r   s   "r   r   r     s       r   c                F    V P                   P                  ;p'       d   V# R# )z
Optionally, the license.

Examples
--------
```python
>>> idx_json = IndexJson.from_path(
...     "../test-data/conda-22.11.1-py38haa244fe_1-index.json"
... )
>>> idx_json.license_family
>>>
```
N)r   license_family)r?   r   s   & r   r   IndexJson.license_family  s"     "[[777>7!!r   c                    V ^8  d   QhRRRR/# rR   r   )r   s   "r   r   r   1  s     . .M .d .r   c                	<    V P                   P                  V4       R # rF   )r   set_license_familyrI   s   &&r   r   r   0      &&u-r   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   5  s     C Ck Cr   c                V    \         P                  ! V P                  P                  4      # )a-  
The lowercase name of the package.

Examples
--------
```python
>>> idx_json = IndexJson.from_path(
...     "../test-data/conda-22.11.1-py38haa244fe_1-index.json"
... )
>>> idx_json.name
PackageName("conda")
>>> idx_json.name = PackageName("rattler")
>>> idx_json.name
PackageName("rattler")
>>>
```
)r   _from_py_package_namer   namerY   s   &r   r   IndexJson.name4  s    & 001A1ABBr   c                    V ^8  d   QhRRRR/# )r   rC   r   r   rD   r   )r   s   "r   r   r   J  s     ' '+ '$ 'r   c                	<    VP                   V P                  n        R # rF   )_namer   r   rI   s   &&r   r   r   I  s     ;;r   c                   V ^8  d   QhRR/# rK   r   )r   s   "r   r   r   N  s      - r   c                F    V P                   P                  ;p'       d   V# R# )z
Optionally, the OS the package is build for.

Examples
--------
```python
>>> idx_json = IndexJson.from_path(
...     "../test-data/conda-22.11.1-py38haa244fe_1-index.json"
... )
>>> idx_json.platform
'win'
>>>
```
N)r   platform)r?   r   s   & r   r   IndexJson.platformM  s!      {{+++8+Or   c                    V ^8  d   QhRRRR/# rR   r   )r   s   "r   r   r   c  r|   r   c                	<    V P                   P                  V4       R # rF   )r   set_platformrI   s   &&r   r   r   b  r   r   c                   V ^8  d   QhRR/# rK   r   )r   s   "r   r   r   g  s       r   c                F    V P                   P                  ;p'       d   V# R# )z
The subdirectory that contains this package.

Examples
--------
```python
>>> idx_json = IndexJson.from_path(
...     "../test-data/conda-22.11.1-py38haa244fe_1-index.json"
... )
>>> idx_json.subdir
'win-64'
>>>
```
N)r   subdir)r?   r   s   & r   r   IndexJson.subdirf  s!      [['''6'Mr   c                    V ^8  d   QhRRRR/# rR   r   )r   s   "r   r   r   |  s     & &M &d &r   c                	<    V P                   P                  V4       R # rF   )r   
set_subdirrI   s   &&r   r   r   {  s    u%r   c                   V ^8  d   QhRR/# )r   r   Optional[datetime.datetime]r   )r   s   "r   r   r     s      6 r   c                    V P                   P                  ;p'       dA   \        P                  P                  VR,          \        P                  P
                  R7      # R# )a  
The timestamp when this package was created

Examples
--------
```python
>>> idx_json = IndexJson.from_path(
...     "../test-data/conda-22.11.1-py38haa244fe_1-index.json"
... )
>>> idx_json.timestamp
datetime.datetime(2022, 12, 7, 23, 45, 42, 50000, tzinfo=datetime.timezone.utc)
>>> idx_json.timestamp = datetime.datetime(2021, 1, 1, 1, 1, 1, 50000, tzinfo=datetime.timezone.utc)
>>> idx_json.timestamp
datetime.datetime(2021, 1, 1, 1, 1, 1, 50000, tzinfo=datetime.timezone.utc)
>>>
```
     @@)tzN)r   	timestampdatetimefromtimestamptimezoneutc)r?   r   s   & r   r   IndexJson.timestamp  sI    & ---9-$$229v3E(J[J[J_J_2``r   c                    V ^8  d   QhRRRR/# )r   rC   r   r   rD   r   )r   s   "r   r   r     s     D D: Dt Dr   c                	    Vf   R V P                   n        R # \        VP                  4       R,          4      V P                   n        R # )Nr   )r   r   r^   rI   s   &&r   r   r     s2    =$(DKK! %((9F(B$CDKK!r   c                   V ^8  d   QhRR/# rf   r   )r   s   "r   r   r     s     * *	 *r   c                .    V P                   P                  # )a  
Track features are nowadays only used to downweight packages (ie. give them less priority). To
that effect, the number of track features is counted (number of commas) and the package is downweighted
by the number of track_features.

Examples
--------
```python
>>> idx_json = IndexJson.from_path(
...     "../test-data/conda-22.11.1-py38haa244fe_1-index.json"
... )
>>> idx_json.track_features
[]
>>>
```
)r   track_featuresrY   s   &r   r   IndexJson.track_features  s    $ {{)))r   c                    V ^8  d   QhRRRR/# rm   r   )r   s   "r   r   r     s     . .I .$ .r   c                	<    V P                   P                  V4       R # rF   )r   set_track_featuresrI   s   &&r   r   r     r   r   c                    V ^8  d   QhRRRR/# )r   r5   r	   r   r   r   )r   s   "r   r   r     s       	 r   c                	4    V P                  V 4      pWn        V# rF   )__new__r   )r4   r5   
index_jsons   && r   r   IndexJson._from_py_index_json  s    [[%
)r   c                   V ^8  d   QhRR/# rU   r   )r   s   "r   r   r     s      # r   c                    R# )z,
Returns a representation of the IndexJson.
zIndexJson()r   rY   s   &r   __repr__IndexJson.__repr__  s     r   r   N) __name__
__module____qualname____firstlineno____annotations__staticmethodr   r"   r&   r,   classmethodr2   r9   propertyr=   setterrO   rX   ra   rj   rq   ry   r   r   r   r   r   r   r   r   r   __static_attributes__r   r   r   r   r      s   J J" U U ] ] 	K 	K 6 6 * * C C* ^^> >  ( 
[[! ! ! !" \\" " ( ($ ) ) & &" ' ' # #" ^^' '  * __( (  ( ^^' '  & . . C C( 
[[' '  ( __( (  ( ]]& &  . D D * *& . .   r   r   )
__future__r   osr   pathlibr   typingr   r   r   rattler.package.package_namer   rattler.rattlerr	   rattler.version.versionr
   rattler.version.with_sourcer   rattler.networking.clientr   r   r   r   r   <module>r      s5    " 	   0 0 4 ' + 90r rr   