
    -PhR
                        d Z ddlmZ ddlmZ ddlmZ ddlmZ erddl	m
Z
 ddlmZ ddlmZmZ dd	lmZ  G d
 d          ZdS )z&Record metadata for the build process.    )annotations)TYPE_CHECKING)__)stable_hash)Set)Path)Config_ConfigRebuild)Tagsc                  b    e Zd ZdZedd            Zdd e            fddZddZddZ	ddZ
dS )	BuildInfozbuildinfo file manipulator.

    HTMLBuilder and its family are storing their own envdata to ``.buildinfo``.
    This class is a manipulator for the file.
    clstype[BuildInfo]filenamer   returnc                  |                     d          }|                                }|d                                         }|dk    rt          d          }t	          |          |d                             d          st          d          }t	          |          |d	                             d
          st          d          }t	          |          t                      }|d                             d                                          |_	        |d	                             d
                                          |_
        |S )Nutf-8encodingr   z# Sphinx build info version 1z7failed to read broken build info file (unknown version)   zconfig: z<failed to read broken build info file (missing config entry)   ztags: z:failed to read broken build info file (missing tags entry))	read_text
splitlinesrstripr   
ValueError
startswithr   removeprefixstripconfig_hash	tags_hash)r   r   contentlinesversionmsg
build_infos          `/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/sphinx/builders/html/_build_info.pyloadzBuildInfo.load   s%   $$g$66""$$(//##555NOOCS//!Qx"":.. 	"STTCS//!Qx""8,, 	"QRRCS//![[
!&q!6!6z!B!B!H!H!J!J
$Qx44X>>DDFF
    NconfigConfig | NonetagsTags | Noneconfig_categoriesSet[_ConfigRebuild]Nonec                    d| _         d| _        |r3d |                    |          D             }t          |          | _         |r#t          t	          |                    | _        d S d S )N c                (    i | ]}|j         |j        S  )namevalue).0cs     r&   
<dictcomp>z&BuildInfo.__init__.<locals>.<dictcomp>9   s    PPP!afagPPPr(   )r   r    filterr   sorted)selfr)   r+   r-   valuess        r&   __init__zBuildInfo.__init__/   sv      	3PPv}}=N/O/OPPPF*622D 	7(66DNNN	7 	7r(   otherboolc                B    | j         |j         k    o| j        |j        k    S N)r   r    )r;   r>   s     r&   __eq__zBuildInfo.__eq__?   s#     11Wdn6W	
r(   intc                8    t          | j        | j        f          S rA   )hashr   r    )r;   s    r&   __hash__zBuildInfo.__hash__D   s    T%t~6777r(   c               Z    d| j          d| j         d}|                    |d           d S )Nz# Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: z
tags: 
r   r   )r   r    
write_text)r;   r   r%   s      r&   dumpzBuildInfo.dumpG   sU    ( '( ( ^	( ( ( 	 	J99999r(   )r   r   r   r   r   r   )r)   r*   r+   r,   r-   r.   r   r/   )r>   r   r   r?   )r   rC   )r   r   r   r/   )__name__
__module____qualname____doc__classmethodr'   	frozensetr=   rB   rF   rJ   r3   r(   r&   r   r      s             [. !% 1:	7 7 7 7 7 
 
 
 

8 8 8 8: : : : : :r(   r   N)rN   
__future__r   typingr   sphinx.localer   sphinx.util._serialiser   collections.abcr   pathlibr   sphinx.configr	   r
   sphinx.util.tagsr   r   r3   r(   r&   <module>rY      s    , , " " " " " "                   . . . . . . &######44444444%%%%%%=: =: =: =: =: =: =: =: =: =:r(   