a oe}@sddlZddlZddlZddlZddlZddlmZddlmZddl m Z ddl m Z ddl mZddlmZd d Zd d Zd dZddZddZddZGdddeZdS)N)log)DistutilsError)partial)_reqs)Wheel)SetuptoolsDeprecationWarningcCs(t|tr|St|ttfs$J|S)z8Ensure find-links option end-up being a list of strings.) isinstancestrsplittuplelist) find_linksr5C:\Program Files\Certbot\pkgs\setuptools\installer.py_fixup_find_linkss rcCstt|t||S)zLFetch an egg needed for building. Use pip/wheel to fetch/build a wheel.)_DeprecatedInstalleremit_warn_wheel_not_available_fetch_build_egg_no_warn)distreqrrrfetch_build_eggsrcCs\ddl}tjddt||jjt||jt t |dd}|D]}|jj |ddqB|S)Nr) stacklevelT)Z installerZreplace_conflicting)replace) pkg_resourcesrrrZ working_setresolverparse Requirementrradd)rZrequiresrZresolved_distsrrr_fetch_build_eggs s  r!c Cs,ddl}t|}|d}d|vr*tddtjvoddl}z|dWn"|jy8|dtjYn0dS)Nrr#z,WARNING: The wheel package is not available.)rZget_distributionZDistributionNotFoundZannouncerZWARN)rrrrrrs rc@seZdZdZdZdS)rz9setuptools.installer and fetch_build_eggs are deprecated.z Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`. N)__name__ __module__ __qualname__Z_SUMMARYZ_DETAILSrrrrrsr)r2r&r1r-r,Z distutilsrZdistutils.errorsr functoolsrrr#rwarningsrrrr!rr%rrrrrrs"       D