3 ig@sddlZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z m Z ddlmZddlmZdd lmZdd lmZdd lmZmZdd lmZdd lmZmZejeZ Gddde Z!dS)N)Values)List) WheelCache) cmdoptions)RequirementCommand with_cleanup)SUCCESS) CommandError)InstallRequirement)get_requirement_tracker) ensure_dirnormalize_path) TempDirectory)buildshould_build_for_wheel_commandc@s<eZdZdZdZddddZeeee e ddd 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|jjtj|jjtj|jjtj|jjtj|jjtj |jjtj |jjtj |jjtj |jjtj |jjtj|jjtj|jjtj|jjtj|jjddd d d d |jjtj|jjtj|jjd d d dd|jjtjtjtj|j}|jjd||jjd|jdS)Nz-wz --wheel-dir wheel_dirdirzLBuild wheels into , where the default is the current working directory.)destmetavardefaulthelpz --no-verify no_verify store_trueFz%Don't verify if built wheel is valid.)ractionrrz--prezYInclude pre-release and development versions. By default, pip only finds stable versions.)rrrr)cmd_opts add_optionoscurdirr no_binary only_binaryZ prefer_binaryZno_build_isolation use_pep517Z no_use_pep517 constraintseditable requirementssrcignore_requires_pythonno_depsZ progress_bar build_optionsglobal_optionsrequire_hashesmake_option_group index_groupparserinsert_option_group)self index_optsr2;/tmp/pip-build-88gy_88q/pip/pip/_internal/commands/wheel.py add_options+sNzWheelCommand.add_options)optionsargsrcCstj||j|}|j||}t|j|j}t|j|_t |j|j t }t |j ddd}|j||||}|j||||||jdd} |j| ||||j|jd} |j|| j|dd} g} x6| jjD](} | jr| j| qt| r| j| qWt| ||j |jpg|jpgd\}}x|D]|} | jr@| jjsDt | j!sPt yt"j#| j!|jWn>t$k r}z t%j&d | j'||j| WYdd}~XnXq*Wt(|d krt)d t*S) NwheelT)deletekindZglobally_managedF)Ztemp_build_dirr5 req_trackersessionfinder download_dir use_user_site)preparerr<r5 wheel_cacher'r")Zcheck_supported_wheels)r@verifyr)r*z Building wheel for %s failed: %srz"Failed to build one or more wheels)+rcheck_install_build_globalZget_default_session_build_package_finderr cache_dirformat_controlr rr enter_contextr rno_cleanZget_requirementsZmake_requirement_preparerZ make_resolverr'r"Ztrace_basic_inforesolver%valuesis_wheelZsave_linked_requirementrappendrrr)r*linkAssertionErrorZlocal_file_pathshutilcopyOSErrorloggerwarningnamelenr r)r0r5r6r;r<r@r: directoryreqsr?resolverrequirement_setZ reqs_to_buildreqZbuild_successesZbuild_failureser2r2r3runesn            "zWheelCommand.run) __name__ __module__ __qualname____doc__usager4rrrstrintr[r2r2r2r3rs  :r)"loggingrrNoptparserZtypingrZpip._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_builderrr getLoggerr\rQrr2r2r2r3s