:E d Z ddlmZ ddlZddlmZ ddlmZ ddlm Z ddl mZ ddlm Z dd lmZ d dlmZ d dlmZ ed Zeedf ZddZd dZd!dZd Zd Zd Zd Zd Zd ZdS )"aS Helper 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)r r extrass q/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/setuptools/command/_requirestxt.py_preparer s" *. 9 9F-.>GGG 'defaultdict[str, _Ordered[Requirement]]c 0 t t t t f t }| 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"]`. ) r str_Orderedr dictitemsr parse_suffix_for setdefault)r outputsectionvrs r r r ' s h{33 4T : :F$**,, ; ; wQ ; ;A7[^^+,77:::: ; Mr #Mapping[str, _Ordered[Requirement]]c t t j | }t t | }t t | }t t t | }|D ]2}|dt |j z | 3t d | 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 3 K | ]M\ }}|t t d t t | D fV NdS )c 3 4 K | ]}t | V d S N)r ).0r&