
    7 f                    z    d Z ddlmZ ddlZddlZddlZddlmZm	Z	 ddl
Z
erddlmZ ddlmZ dd
ZddZddZdS )z<To publish HTML docs at GitHub Pages, create .nojekyll file.    )annotationsN)TYPE_CHECKINGAny)Sphinx)BuildEnvironmenturlstrreturnc                R    | r$t           j                            |           j        pdS )zGet the domain from a URL. )urllibparseurlparsehostname)r   s    L/var/www/equiseq/venv/lib/python3.11/site-packages/sphinx/ext/githubpages.py_get_domain_from_urlr      s%    66<((--6<"<    appr   envr   Nonec                P   | j         j        dk    rdS | j         j                            d                                           t
          j                            | j         j        d          }t          | j	        j
                  }|rW|                    d          sBt          |dd          5 }|                    |           ddd           dS # 1 swxY w Y   dS t          j        t                     5  t          j        |           ddd           dS # 1 swxY w Y   dS )	aK  Manage the ``.nojekyll`` and ``CNAME`` files for GitHub Pages.

    For HTML-format builders (e.g. 'html', 'dirhtml') we unconditionally create
    the ``.nojekyll`` file to signal that GitHub Pages should not run Jekyll
    processing.

    If the :confval:`html_baseurl` option is set, we also create a CNAME file
    with the domain from ``html_baseurl``, so long as it is not a ``github.io``
    domain.

    If this extension is loaded and the domain in ``html_baseurl`` no longer
    requires a CNAME file, we remove any existing ``CNAME`` files from the
    output directory.
    htmlNz	.nojekyllCNAMEz
.github.iowzutf-8)encoding)builderformatoutdirjoinpathtouchospathjoinr   confightml_baseurlendswithopenwrite
contextlibsuppressFileNotFoundErrorunlink)r   r   
cname_pathdomainfs        r   create_nojekyll_and_cnamer0      s    {V##K,,22444ck0'::J!#*"9::F "fool33 "*cG444 	 GGFOOO	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	
  !233 	" 	"Ij!!!	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	"s$   0CCC9DD"Ddict[str, Any]c                V    |                      dt                     t          j        ddS )Nzenv-updatedT)versionparallel_read_safe)connectr0   sphinx__display_version__)r   s    r   setupr8   7   s(    KK89991NNNr   )r   r	   r
   r	   )r   r   r   r   r
   r   )r   r   r
   r1   )__doc__
__future__r   r)   r!   urllib.parser   typingr   r   r6   sphinx.applicationr   sphinx.environmentr   r   r0   r8    r   r   <module>r@      s    B B " " " " " "     				     % % % % % % % %  4))))))333333= = = =
" " " "BO O O O O Or   