aJY>?B d Z ddlZddlmZ ddlmZ ddlmZmZm Z m
Z
mZ ddlm
Z
ddlmZ dd lmZ ed
Zeedf ZeZe
j Zdede
eef d
e ee eeee f f fdZded
e
eee f fdZdede
eee f d
e ee eeee f f fdZd Zd Zd Zd Zd Zd Z dS )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
N)defaultdict)filterfalse)DictListTupleMappingTypeVar )_reqs)yield_lines)Requirement_Tinstall_requiresextras_requirereturnc @ 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 /builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/python3.11/site-packages/setuptools/command/_requirestxt.py_preparer s" *.
9
9F-.>GGG c t 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 dictitemsr parse_suffix_for
setdefault)r outputsectionvrs r r r $ s 3>d2C2CF$**,, ; ;
wQ ; ;A7[^^+,77:::: ; Mr 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)str).0r" s r