a (Re @spddlZddlZddlZddlZddlZddlmZddlmZddl Z ddl m Z ddZ ddZ d d ZdS) N)log)DistutilsError)WheelcCs(t|tr|St|ttfs$J|S)z8Ensure find-links option end-up being a list of strings.) isinstancestrsplittuplelist) find_linksr /builddir/build/BUILDROOT/alt-python39-setuptools-58.3.0-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/setuptools/installer.py_fixup_find_links s r c CsVztdWn"tjy0|dtjYn0t|}|d}d|vrTtddt j vofdt j v}dt j vrxd }nd |vr|d d }nd }d |vrt |d d d d ng}|j r| |j t j|}t}t|D]}||vr||r|Sqt,} tjd ddddd| g} |r<| d|d urT| d|f|p\gD]} | d| fq^| |jpt|zt| Wn6tjy} ztt| | WYd } ~ n d } ~ 00ttt j | dd} t j || !}| "|t#|t j |d}tj$j%||d}|Wd S1sH0Yd S)zLFetch an egg needed for building. Use pip/wheel to fetch/build a wheel.wheelz,WARNING: The wheel package is not available. easy_installZ allow_hostszQthe `allow-hosts` option is not supported when using pip to install requirements.Z PIP_QUIETZ PIP_VERBOSEZ PIP_INDEX_URLN index_urlr z-mpipz--disable-pip-version-checkz --no-depsz-wz--quietz --index-urlz --find-linksz*.whlrzEGG-INFO)metadata)& pkg_resourcesget_distributionDistributionNotFoundannouncerWARN strip_markerget_option_dictrosenvironr Zdependency_linksextendpathrealpathZget_egg_cache_dir Environmentfind_distributionscan_addtempfileTemporaryDirectorysys executableappendurlr subprocess check_callCalledProcessErrorrglobjoinegg_nameZinstall_as_egg PathMetadata Distribution from_filename)distreqoptsquietrr Zeggs_dir environmentZegg_distZtmpdircmdlinker dist_locationZ dist_metadatar r r fetch_build_eggsf        $ r;cCstjt|}d|_|S)z Return a new requirement without the environment marker to avoid calling pip with something like `babel; extra == "i18n"`, which would always be ignored. N)r Requirementparsermarker)r3r r r rXsr)r,rr)r%r# distutilsrdistutils.errorsrrZsetuptools.wheelrr r;rr r r r s   C