U ja@sddlZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z m Z ddlmZddlmZdd lmZdd lmZdd lmZmZdd lmZdd lmZmZeeZ 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)returncCs|jjddddtjdd|jt|jt|jt|jt|jt |jt |jt |jt |jt |jt|jt|jt|jt|jt|jjddd d d d |jt|jt|jjd d d dd|jtttj|j}|jd||jd|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_binary prefer_binaryno_build_isolation use_pep517 no_use_pep517 constraintseditable requirementssrcignore_requires_pythonno_deps build_dir progress_bar build_optionsglobal_optionsrequire_hashesmake_option_group index_groupparserinsert_option_group)self index_optsr7t/private/var/folders/k6/_7fsz4ts3b78x3b3xwrxjh_c8s8xv7/T/pip-unpacked-wheel-bug3gbve/pip/_internal/commands/wheel.py add_options+sXzWheelCommand.add_options)optionsargsrc Cst|||}|||}t|j|j}t|j|_t |j| t }t |j ddd}|||||}|j||||||jdd} |j| ||||j|jd} ||| j|dd} g} | jD](} | jr| | qt| r| | qt| ||j |jp g|jpgd\}}|D]|} | jr:| jjs>t | j!sJt zt"#| j!|jWn>t$k r}zt%&d | j'||| W5d}~XYnXq$t(|d krt)d t*S) NwheelT)deletekindglobally_managedF)temp_build_dirr: req_trackersessionfinder download_dir use_user_site)preparerrCr: wheel_cacher*r$)check_supported_wheels)rGverifyr.r/z Building wheel for %s failed: %srz"Failed to build one or more wheels)+rcheck_install_build_globalget_default_session_build_package_finderr cache_dirformat_controlr rr enter_contextr rno_cleanget_requirementsmake_requirement_preparer make_resolverr*r$trace_basic_inforesolver(valuesis_wheelZsave_linked_requirementrappendrrr.r/linkAssertionErrorlocal_file_pathshutilcopyOSErrorloggerwarningnamelenr r)r5r:r;rBrCrGrA directoryreqsrFresolverrequirement_set reqs_to_buildreqbuild_successesbuild_failureser7r7r8runas              zWheelCommand.run) __name__ __module__ __qualname____doc__usager9rrrstrintrlr7r7r7r8rs 6r)"loggingrr\optparsertypingrpip._internal.cacherZpip._internal.clirpip._internal.cli.req_commandrrpip._internal.cli.status_codesrpip._internal.exceptionsr Zpip._internal.req.req_installr pip._internal.req.req_trackerr pip._internal.utils.miscr r pip._internal.utils.temp_dirrpip._internal.wheel_builderrr getLoggerrmr_rr7r7r7r8s