޼:EdZddlmZddlZddlmZddlmZddlm Z ddl m Z ddl m Z dd lmZd d lmZd d lmZe d ZeedfZddZd dZd!dZdZdZdZdZdZdZdS)"aSHelper code used to generate ``requires.txt`` files in the egg-info directory. The ``requires.txt`` file has an specific format: - Environment markers need to be part of the section headers and should not be part of the requirement spec itself. See https://setuptools.pypa.io/en/latest/deprecated/python_eggs.html#requires-txt ) annotationsN) defaultdict)Mapping) filterfalse)TypeVar) yield_lines) Requirement)_reqs) _StrOrIter_Tinstall_requiresr extras_requireMapping[str, _StrOrIter]return&tuple[list[str], dict[str, list[str]]]c@t|}t||S)zGiven values for ``install_requires`` and ``extras_require`` create modified versions in a way that can be written in ``requires.txt`` )_convert_extras_requirements"_move_install_requirements_markers)rrextrass q/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/setuptools/command/_requirestxt.py_preparers" *. 9 9F -.> G GG'defaultdict[str, _Ordered[Requirement]]c0ttttft}|D]O\}}||t j|D]-}||t|z |.P|S)z Convert requirements in `extras_require` of the form `"extra": ["barbazquux; {marker}"]` to `"extra:{marker}": ["barbazquux"]`. ) rstr_Orderedr dictitemsr parse _suffix_for setdefault)routputsectionvrs rrr'sh{33 4T : :F$**,,;; wQ ; ;A 7[^^+ , 7 7 : : : : ; Mr#Mapping[str, _Ordered[Requirement]]cttj|}tt|}t t|}tt t|}|D]2}|dt|jz |3td| D}||fS)a+ The ``requires.txt`` file has an specific format: - Environment markers need to be part of the section headers and should not be part of the requirement spec itself. Move requirements in ``install_requires`` that are using environment markers ``extras_require``. :c 3K|]M\}}|ttdtt|DfVNdS)c34K|]}t|VdSN)r).0r&s r z?_move_install_requirements_markers...Rs(BB!s1vvBBBBBBrN)listrfromkeysmap _clean_req)r-kr%s rr.z5_move_install_requirements_markers..Psn Aq DBBs:q/A/ABBBBB C CDr) r/r r filter _no_markerrr1rmarkerr"rr)rr inst_reqs simple_reqs complex_reqssimple_install_requiresr&expanded_extrass rrr9sU[!12233IY//Kz955L"3sK#8#899 ::sS]]*+66q9999#((**O #O 33rcB|jrdt|jzndS)z;Return the 'extras_require' suffix for a given requirement.r))r6rreqs rr!r!Ys!$'J 63SZ B6rcLtt|}d|_|S)z=Given a Requirement, remove environment markers and return itN)r rr6)r?r&s rr2r2^s!CHHAAH Hrc|j Sr,)r6r>s rr5r5es z>rcxt|pd}d}t||}||dS)Nc |dzS)N rC)lines r append_crz&_write_requirements..append_crls d{r)rr1 writelines)streamreqslinesrGs r_write_requirementsrLisM   # #E  5 ! !E erc |j}tj}t|jpd|jpi\}}t ||t|D]D}|dj ditt |||E| d|| dS)NrCz [{extra}] requirements) distributionioStringIOrrrrLsortedwriteformatvarswrite_or_delete_filegetvalue)cmdbasenamefilenamedistdatarrextras rwrite_requirementsr^ss  D ;==D'/ #T%8%>B(($n.///''99 )?)33DFF33444D."78888^Xt}}GGGGGrctj}t||jj|d||dS)Nzsetup-requirements)rPrQrLrOsetup_requiresrVrW)rXrYrZr\s rwrite_setup_requirementsrasJ ;==Dc.=>>>18T]]__MMMMMr)rr rrrr)rrrr)rr rr'rr)__doc__ __future__rrP collectionsrcollections.abcr itertoolsrtypingr jaraco.textrpackaging.requirementsr r=r r r rrrrrr!r2r5rLr^rarCrrrjs#""""" ############!!!!!!######...... WT]] D>HHHH$4444@777     H H HNNNNNr