o ÏEcã@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<eZdZdZdZd dd„Zededee de fd d „ƒ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] ...ÚreturnNcCsv|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_pep517Z 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&úO/opt/alt/python310/lib/python3.10/site-packages/pip/_internal/commands/wheel.pyÚ add_options+sVù ûû þzWheelCommand.add_optionsÚoptionsÚargsc Cst |¡| |¡}| ||¡}t|j|jƒ}t|jƒ|_t |jƒ|  t ƒ¡}t |j ddd}| ||||¡}|j||||||jdd} |j| ||||j|jd} | |¡| j|dd} g} | j ¡D]} | jrq|  | ¡qft| ƒrz|  | ¡qft| ||j |jp…g|jp‰gd\}}|D]+} z t  | j!|j¡Wqt"y»}zt# $d | j%|¡| | ¡WYd}~qd}~wwt&|ƒd krÆt'd ƒ‚t(S) NZwheelT)ÚdeleteÚkindZglobally_managedF)Ztemp_build_dirr)Ú req_trackerÚsessionÚfinderZ download_dirZ use_user_site)Úpreparerr/r)Ú wheel_cacher!r)Zcheck_supported_wheels)r1Zverifyr"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#ÚshutilÚcopyZlocal_file_pathÚOSErrorÚloggerZwarningÚnameÚlenr r)r%r)r*r.r/r1r-Z directoryZreqsr0ZresolverZrequirement_setZ reqs_to_buildZreqZbuild_successesZbuild_failuresÚer&r&r'Úrunesz      ýù ú   € ûý€ú zWheelCommand.run)rN) Ú__name__Ú __module__Ú __qualname__Ú__doc__Zusager(rrrÚstrÚintr=r&r&r&r'rs  : r)"Zloggingrr6ZoptparserÚ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>r9rr&r&r&r'Ús"