o g>@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<eZdZdZdZd ddZededee 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|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 progress_bar build_optionsglobal_optionsrequire_hashesmake_option_group index_groupparserinsert_option_group)self index_optsr6>/usr/lib/python3/dist-packages/pip/_internal/commands/wheel.py add_options+sV  zWheelCommand.add_optionsoptionsargsc Cst|||}|||}t|j|j}t|j|_t |j| t }t |j ddd}|||||}|j||||||jd|jd} |j| ||||j|jd} ||| j|dd} g} | jD]} | jrs| | qht| r|| | qht| ||j |jpg|jpgd\}}|D]9} | j r| j jsJ| j!sJz t"#| j!|jWqt$y}zt%&d | j'||| WYd}~qd}~wwt(|d krt)d t*S) NwheelT)deletekindglobally_managedF)temp_build_dirr9 req_trackersessionfinder download_dir use_user_site verbosity)preparerrBr9 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_preparerrE make_resolverr*r$trace_basic_inforesolver(valuesis_wheelsave_linked_requirementrappendrrr-r.linklocal_file_pathshutilcopyOSErrorloggerwarningnamelenr r)r4r9r:rArBrGr@ directoryreqsrFresolverrequirement_set reqs_to_buildreqbuild_successesbuild_failureser6r6r7runes             zWheelCommand.run)rN) __name__ __module__ __qualname____doc__usager8rrrstrintrlr6r6r6r7rs  : r)"loggingrr\optparsertypingrpip._internal.cacherpip._internal.clirpip._internal.cli.req_commandrrpip._internal.cli.status_codesrpip._internal.exceptionsr pip._internal.req.req_installr pip._internal.req.req_trackerr pip._internal.utils.miscr r pip._internal.utils.temp_dirrpip._internal.wheel_builderrr getLoggerrmr_rr6r6r6r7s"