3 Bu_@sddlmZddlZddlZddlZddlmZddlmZddl m Z m Z ddl m Z ddlmZddlmZdd lmZmZdd lmZdd lmZdd lmZmZerdd lmZddlmZej e!Z"Gddde Z#dS))absolute_importN) WheelCache) cmdoptions)RequirementCommand with_cleanup)SUCCESS) CommandError)get_requirement_tracker) ensure_dirnormalize_path) TempDirectory)MYPY_CHECK_RUNNING)buildshould_build_for_wheel_command)Values)Listc@s(eZdZdZdZddZeddZdS) 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] ...cCs||jjddddtjdd|jjtj|jjtj|jjtj|jjddd d d d |jjtj|jjtj |jjtj |jjtj |jjtj |jjtj |jjtj|jjtj|jjtj|jjtj|jjtj|jjd dd d dd|jjddddd|jjtjtjtj|j}|jjd||jjd|jdS)Nz-wz --wheel-dir wheel_dirdirzLBuild wheels into , where the default is the current working directory.)destmetavardefaulthelpz--build-option build_optionsoptionsappendz9Extra arguments to be supplied to 'setup.py bdist_wheel'.)rractionrz--global-optionglobal_optionszZExtra global options to be supplied to the setup.py call before the 'bdist_wheel' command.)rrrrz--pre store_trueFzYInclude 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_barrequire_hashesmake_option_group index_groupparserinsert_option_group)self index_optsr8/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-1.el7.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/wheel.py add_options2sVzWheelCommand.add_optionscCstj||j|}|j||}|jp*|j }t|j|j}t |j |_ t |j |j t }t|j|ddd}|j||||} |j||||||j dd} |j| ||||j|jd} |j|| j| dd} dd | jjD} t| ||jpg|jpgd \}}x|D]|}|jr|jjs t|js,tytj |j|j Wn>t!k r~}z t"j#d |j$||j%|WYdd}~XnXqWt&|d krt'd t(S)NwheelT)deletekindglobally_managedF)temp_build_dirr req_trackersessionfinderwheel_download_dir use_user_site)preparerrBr wheel_cacher-r')check_supported_wheelscSsg|]}t|r|qSr8)r).0rr8r8r9 sz$WheelCommand.run..)rFrrz Building wheel for %s failed: %srz"Failed to build one or more wheels))rcheck_install_build_globalget_default_session_build_package_finderno_cleanr/r cache_dirformat_controlr rr enter_contextr r get_requirementsmake_requirement_preparer make_resolverr-r'trace_basic_inforesolver+valuesrrrlinkis_wheelAssertionErrorlocal_file_pathshutilcopyOSErrorloggerwarningnamerlenrr)r6rargsrArB build_deleterFr@ directoryreqsrEresolverrequirement_set reqs_to_buildbuild_successesbuild_failuresreqer8r8r9runmsh            "zWheelCommand.runN)__name__ __module__ __qualname____doc__usager:rrnr8r8r8r9rs ;r)$ __future__rloggingr!r\pip._internal.cacherZpip._internal.clirpip._internal.cli.req_commandrrpip._internal.cli.status_codesrpip._internal.exceptionsrpip._internal.req.req_trackerr pip._internal.utils.miscr r pip._internal.utils.temp_dirr pip._internal.utils.typingr pip._internal.wheel_builderrroptparsertypingr getLoggerror_rr8r8r8r9s$