(sections)
Historically, setuptools would solicit and store 'extra'
        requirements, including those with environment markers,
        in separate sections. More modern tools expect each
        dependency to be defined separately, with any relevant
        extras and environment markers attached directly to that
        requirement. This method converts the former to the
        latter. See _test_deps_from_requires_text for an example.
Historically, setuptools would solicit and store 'extra'
        requirements, including those with environment markers,
        in separate sections. More modern tools expect each
        dependency to be defined separately, with any relevant
        extras and environment markers attached directly to that
        requirement. This method converts the former to the
        latter. See _test_deps_from_requires_text for an example.
Historically setuptools would solicit and store extra requirements including those with environment markers in separate sections . More modern tools expect each dependency to be defined separately with any relevant extras and environment markers attached directly to that requirement . This method converts the former to the latter . See _test_deps_from_requires_text for an example .
def _convert_egg_info_reqs_to_simple_reqs(sections):
        """
        Historically, setuptools would solicit and store 'extra'
        requirements, including those with environment markers,
        in separate sections. More modern tools expect each
        dependency to be defined separately, with any relevant
        extras and environment markers attached directly to that
        requirement. This method converts the former to the
        latter. See _test_deps_from_requires_text for an example.
        """

        def make_condition(name):
            return name and f'extra == "{name}"'

        def parse_condition(section):
            section = section or ''
            extra, sep, markers = section.partition(':')
            if extra and markers:
                markers = f'({markers})'
            conditions = list(filter(None, [markers, make_condition(extra)]))
            return '; ' + ' and '.join(conditions) if conditions else ''

        for section in sections:
            yield section.value + parse_condition(section.name)
def _convert_egg_info_reqs_to_simple_reqs ( sections ) : def make_condition ( name ) : return name and f'extra == "{name}"' def parse_condition ( section ) : section = section or '' extra , sep , markers = section . partition ( ':' ) if extra and markers : markers = f'({markers})' conditions = list ( filter ( None , [ markers , make_condition ( extra ) ] ) ) return '; ' + ' and ' . join ( conditions ) if conditions else '' for section in sections : yield section . value + parse_condition ( section . name )