3

Q'íc1ã@sªddlmZddlZddlZddlZddlmZddlmZm	Z	ddl
mZddlm
Z
ddlmZddlmZdd	lmZmZdd
lmZejeƒZGdd„deƒZdS)
é)Úabsolute_importN)ÚRequirementCommand)ÚCommandErrorÚPreviousBuildDirError)ÚRequirementSet)Úimport_or_raise)ÚBuildDirectory)ÚRemovedInPip10Warning)Ú
WheelCacheÚWheelBuilder)Ú
cmdoptionscs<eZdZdZdZdZdZ‡fdd„Zdd„Zd	d
„Z	‡Z
S)Ú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.

    Úwheelzõ
      %prog [options] <requirement specifier> ...
      %prog [options] -r <requirements file> ...
      %prog [options] [-e] <vcs project url> ...
      %prog [options] [-e] <local project path> ...
      %prog [options] <archive url/path> ...z$Build wheels from your requirements.csPtt|ƒj||Ž|j}|jddddtjdd|jtjƒƒ|jtj	ƒƒ|jtj
ƒƒ|jtjƒƒ|jddd	d
dd|jtjƒƒ|jtj
ƒƒ|jtjƒƒ|jtjƒƒ|jtjƒƒ|jtjƒƒ|jtjƒƒ|jd
dd
d	dd|jddddd|jtjƒƒ|jtjƒƒtjtj|jƒ}|jjd|ƒ|jjd|ƒdS)Nz-wz--wheel-dirÚ	wheel_dirÚdirzLBuild wheels into <dir>, where the default is the current working directory.)ÚdestÚmetavarÚdefaultÚhelpz--build-optionÚ
build_optionsÚoptionsÚappendz9Extra arguments to be supplied to 'setup.py bdist_wheel'.)rrÚactionrz--global-optionÚglobal_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)Úsuperr
Ú__init__Úcmd_optsÚ
add_optionÚosÚcurdirrÚ	use_wheelÚno_use_wheelÚ	no_binaryÚonly_binaryÚconstraintsÚeditableÚrequirementsÚsrcÚignore_requires_pythonÚno_depsÚ	build_dirÚno_cleanÚrequire_hashesÚmake_option_groupÚindex_groupÚparserÚinsert_option_group)ÚselfÚargsÚkwrÚ
index_opts)Ú	__class__©ú1/tmp/pip-build-l_bcah40/pip/pip/commands/wheel.pyr.sVzWheelCommand.__init__cCs.tdtdƒtdtdƒ}t|dƒs*tdƒ‚dS)Nzwheel.bdist_wheelzM'pip wheel' requires the 'wheel' package. To fix this, run: pip install wheelÚ
pkg_resourceszp'pip wheel' requires setuptools >= 0.8 for dist-info support. To fix this, run: pip install --upgrade setuptoolsÚDistInfoDistribution)rrÚhasattr)r2r9r7r7r8Úcheck_required_packageshs
z$WheelCommand.check_required_packagesc Cs¼|jƒtj|ƒtj|ƒ|jr.tjdtƒ|jr@tjdtƒ|j	rRtjdtƒ|j
g|j}|jr|t
jddj|ƒƒg}|jr’tjj|jƒ|_tjj|jƒ|_|j|ƒ}|j||ƒ}|jpÆ|j}t|j|jƒ}t|j|dÂ}t||jd|jd|j|j|||j |j!d}	|j"|	|||||j#|ƒ|	j$s6dSzZy6t%|	||j&pJg|j'pTgd	}
|
j(ƒslt)d
ƒ‚Wnt*k
rŒd|_‚YnXWd|js¢|	j+ƒXWdQRXWdQRXdS)Nz--allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z“--allow-all-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z‘--allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.zIgnoring indexes: %sú,)ÚdeleteT)r+Úsrc_dirÚdownload_dirÚignore_dependenciesÚignore_installedr)ÚisolatedÚsessionÚwheel_cacheÚwheel_download_dirr-)rrz"Failed to build one or more wheels),r<rÚresolve_wheel_no_use_binaryÚcheck_install_build_globalÚallow_externalÚwarningsÚwarnr	Úallow_all_externalÚallow_unverifiedÚ	index_urlÚextra_index_urlsÚno_indexÚloggerÚdebugÚjoinr+rÚpathÚabspathr?Ú_build_sessionÚ_build_package_finderr,r
Ú	cache_dirÚformat_controlrrrAr)Ú
isolated_moderr-Úpopulate_requirement_setÚnameÚhas_requirementsrrrÚbuildrrÚ
cleanup_files)r2rr3Ú
index_urlsrDÚfinderÚbuild_deleterEr+Úrequirement_setÚwbr7r7r8Úrun|sv






zWheelCommand.run)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r\ÚusageÚsummaryrr<reÚ
__classcell__r7r7)r6r8r
s
:r
)Ú
__future__rÚloggingrrJÚpip.basecommandrÚpip.exceptionsrrÚpip.reqrÚ	pip.utilsrÚpip.utils.buildrZpip.utils.deprecationr	Ú	pip.wheelr
rÚpiprÚ	getLoggerrfrQr
r7r7r7r8Ú<module>s