a [›ýfã@sÒddlZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z m Z ddlmZddlmZdd lmZdd lmZdd lmZmZdd lmZdd lmZmZe e¡Z Gdd„de ƒZ!dS)éN)ÚValues)ÚList)Ú WheelCache)Ú cmdoptions)ÚRequirementCommandÚ with_cleanup)ÚSUCCESS)Ú CommandError)ÚInstallRequirement)Úget_requirement_tracker)Ú ensure_dirÚnormalize_path)Ú TempDirectory)ÚbuildÚshould_build_for_wheel_commandc@s<eZdZdZdZddœdd„Zeeee e dœdd „ƒZ dS) Ú WheelCommanda´ Build Wheel archives for your requirements and dependencies. Wheel is a built-package format, and offers the advantage of not recompiling your software during every install. For more details, see the wheel docs: https://wheel.readthedocs.io/en/latest/ Requirements: setuptools>=0.8, and wheel. 'pip wheel' uses the bdist_wheel setuptools extension from the wheel package to build individual wheels. zõ %prog [options] ... %prog [options] -r ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...N)ÚreturncCsv|jjddddtjdd|j t ¡¡|j t ¡¡|j t ¡¡|j t ¡¡|j t  ¡¡|j t  ¡¡|j t  ¡¡|j t  ¡¡|j t  ¡¡|j t ¡¡|j t ¡¡|j t ¡¡|j t ¡¡|jjddd d d d |j t ¡¡|j t ¡¡|jjd d d dd|j t ¡¡t tj|j¡}|j d|¡|j d|j¡dS)Nz-wz --wheel-dirÚ wheel_dirÚdirzLBuild wheels into , where the default is the current working directory.)ÚdestÚmetavarÚdefaultÚhelpz --no-verifyÚ no_verifyÚ store_trueFz%Don't verify if built wheel is valid.)rÚactionrrz--prezYInclude pre-release and development versions. By default, pip only finds stable versions.)rrrr)Zcmd_optsZ add_optionÚosÚcurdirrZ no_binaryZ only_binaryZ prefer_binaryZno_build_isolationÚ use_pep517Z no_use_pep517Ú constraintsZeditableÚ requirementsÚsrcÚignore_requires_pythonZno_depsZ progress_barÚ build_optionsÚglobal_optionsZrequire_hashesZmake_option_groupZ index_groupÚparserZinsert_option_group)ÚselfZ index_opts©r'ú@/usr/lib/python3.9/site-packages/pip/_internal/commands/wheel.pyÚ add_options+sVù ûû þzWheelCommand.add_options)ÚoptionsÚargsrc Cs¾t |¡| |¡}| ||¡}t|j|jƒ}t|jƒ|_t |jƒ|  t ƒ¡}t |j ddd}| ||||¡}|j||||||jdd} |j| ||||j|jd} | |¡| j|dd} g} | j ¡D](} | jrâ|  | ¡qÌt| ƒrÌ|  | ¡qÌt| ||j |jp g|jpgd\}}|D]~} | jr:| jjs>J‚| j sJJ‚zt! "| j |j¡Wn@t#yž}z&t$ %d | j&|¡| | ¡WYd}~n d}~00q$t'|ƒd krºt(d ƒ‚t)S) NZwheelT)ÚdeleteÚkindZglobally_managedF)Ztemp_build_dirr*Ú req_trackerÚsessionÚfinderZ download_dirZ use_user_site)Úpreparerr0r*Ú wheel_cacher"r)Zcheck_supported_wheels)r2Zverifyr#r$z Building wheel for %s failed: %srz"Failed to build one or more wheels)*rZcheck_install_build_globalZget_default_sessionZ_build_package_finderrZ cache_dirZformat_controlr rr Ú enter_contextr rZno_cleanZget_requirementsZmake_requirement_preparerZ make_resolverr"rZtrace_basic_infoÚresolver ÚvaluesZis_wheelZsave_linked_requirementrÚappendrrr#r$ÚlinkZlocal_file_pathÚshutilÚcopyÚOSErrorÚloggerZwarningÚnameÚlenr r)r&r*r+r/r0r2r.Z directoryZreqsr1ZresolverZrequirement_setZ reqs_to_buildZreqZbuild_successesZbuild_failuresÚer'r'r(Úrunesx      ýù ú     û  ý$zWheelCommand.run) Ú__name__Ú __module__Ú __qualname__Ú__doc__Úusager)rrrÚstrÚintr?r'r'r'r(rs :r)"Zloggingrr8ZoptparserÚtypingrZpip._internal.cacherZpip._internal.clirZpip._internal.cli.req_commandrrZpip._internal.cli.status_codesrZpip._internal.exceptionsr Zpip._internal.req.req_installr Zpip._internal.req.req_trackerr Zpip._internal.utils.miscr r Zpip._internal.utils.temp_dirrZpip._internal.wheel_builderrrZ getLoggerr@r;rr'r'r'r(Ús