ó â\e[c@s‚dZddlZddlZddlZddlZddlZddlZddlZddlm Z ddl m Z ddl m Z ddlmZddlmZddlZdd lmZmZmZmZdd lmZmZdd lmZdd lmZdd lm Z ddl!mZddl!m"Z#ej$Z$ej%Z%dZ&d„Z'd„Z(de fd„ƒYZ)dS(sI Create a wheel (.whl) distribution. A wheel is a built archive format. iÿÿÿÿN(t Generator(tCommand(tget_python_version(tlog(trmtreei(t get_abbr_implt get_impl_vert get_abi_tagt get_platform(tnativet open_for_csv(tarchive_wheelfile(twrite_pkg_info(tpkginfo_to_metadata(t pep425tags(t __version__scp3\dcCst|ƒjddƒS(Nt-t_(t safe_nametreplace(tname((s2/tmp/pip-install-0xiv62/wheel/wheel/bdist_wheel.pyt safer_name%scCst|ƒjddƒS(NRR(t safe_versionR(tversion((s2/tmp/pip-install-0xiv62/wheel/wheel/bdist_wheel.pyt safer_version)st bdist_wheelcBsïeZdZd.dddeƒfddd d fd/d1d2d3d4d5dd0deƒdfd6d7g ZddddgZd!„Zd"„Z e d#„ƒZ d$„Z d%„Z d&„Zd'ed(d)„Zd*„Zd+„Zd,„Zd-„ZRS(8screate a wheel distributions bdist-dir=tbs1temporary directory for creating the distributions plat-name=tps;platform name to embed in generated filenames (default: %s)s keep-temptks/keep the pseudo-installation tree around after s!creating the distribution archives dist-dir=tds-directory to put final built distributions ins skip-builds2skip rebuilding everything (for testing/debugging)trelatives6build the archive using relative paths(default: false)sowner=tus@Owner name used when creating a tar file [default: current user]sgroup=tgsAGroup name used when creating a tar file [default: current group]t universals'make a universal wheel (default: false)s python-tag=s7Python implementation compatibility tag (default: py%s)is build-number=sqBuild number for this particular version. As specified in PEP-0427, this must start with a digit. [default: None]spy-limited-api=s?Python tag (cp32|cp33|cpNN) for abi3 wheel tag (default: false)cCsºd|_d|_d|_d|_d|_t|_d|_d|_ d|_ d|_ d|_ t|_ d|_d|_t|_dtƒd|_d|_t|_t|_dS(Ntziptpyi(tNonet bdist_dirtdata_dirt plat_nametplat_tagtformattFalset keep_temptdist_dirt distinfo_dirt egginfo_dirt root_is_puret skip_buildRtownertgroupR!Rt python_tagt build_numbertpy_limited_apitplat_name_supplied(tself((s2/tmp/pip-install-0xiv62/wheel/wheel/bdist_wheel.pytinitialize_optionsWs&                 cCsZ|jdkr<|jdƒj}tjj|dƒ|_n|jd|_|j dk |_ d}|j dt ||ƒŒ|j jƒp˜|j jƒ |_|jrÑtjt|jƒ rÑtdtƒ‚n|j jdƒ}d|kr$|dd jƒ}|jƒdkr$t|_q$n|jdk rV|jd jƒ rVtd ƒ‚ndS(Ntbdisttwheels.dataR,R'R0spy-limited-api must match '%s'R!it1ttruetyess1Build tag (build-number) must start with a digit.(sdist_dirs plat_names skip_build(R;struesyes(R%R$tget_finalized_commandt bdist_basetostpathtjointwheel_dist_nameR&R'R6tset_undefined_optionsR"t distributionthas_ext_modulesthas_c_librariesR/R5tretmatchtPY_LIMITED_API_PATTERNt ValueErrortget_option_dicttstriptlowertTrueR!R4tisdigit(R7R?t need_optionsR:tval((s2/tmp/pip-install-0xiv62/wheel/wheel/bdist_wheel.pytfinalize_optionsls&  #cCsSt|jjƒƒt|jjƒƒf}|jrF||jf7}ndj|ƒS(s4Return distribution full name with - replaced with _R(RREtget_nameRt get_versionR4RB(R7t components((s2/tmp/pip-install-0xiv62/wheel/wheel/bdist_wheel.pyRCŠs  cCs›|jr|j}nH|jr'd}n6|jp6tƒ}|dkr]tjdkr]d}n|jddƒjddƒ}|jr±|jr–d }n |j}|d |f}næt ƒ}t ƒ}||}|j rû||j d ƒrû|j }d }nt tƒƒjƒ}|||f}tjd |jr7|ndƒ}|j sv||dksvtd||dfƒ‚n||ks—tdj|ƒƒ‚|S(Ntanys linux-x86_64t linux_x86_64iÿÿÿt linux_i686RRt.spy2.py3tnonetcp3tabi3tsupplied_platformis%s != %ss)would build wheel with unsupported tag {}(s linux-x86_64s linux_x86_64(R6R'R/RtsystmaxsizeRR!R3RRR5t startswithtstrRRNRt get_supportedR$tAssertionErrorR)(R7R'timplttagt impl_nametimpl_vertabi_tagtsupported_tags((s2/tmp/pip-install-0xiv62/wheel/wheel/bdist_wheel.pytget_tag“s6                -!cCs2|jƒ\}}}d|j|||f}|S(s%Return archive name without extensions %s-%s-%s-%s(RkRC(R7timpl_tagRiR(tarchive_basename((s2/tmp/pip-install-0xiv62/wheel/wheel/bdist_wheel.pytget_archive_basename¹s c Csß|jdƒ}d|_|js1|jdƒn|jddtƒ}|j|_t|_|j|_t|_ |jdƒ}t|_ x4dD],}t |d |t j j|j|ƒƒqWd }t jdkr t j jt j j|jdƒƒ}||_|_nt ||jr dnd|ƒtjd|jƒ|jdƒ|jƒ}t j j|j|ƒ}|jsƒ|j}n$t j j|j|j|jƒƒ}|jddƒt j j|jd|jƒ|_|j|j |jƒ|j!|jƒ|j"|j|jƒt j j#|jƒs=t j$|jƒnt%||ƒ} dt j&kr{t'j(t j&dd| gƒnt)|j*dgƒj+dt,ƒ| fƒ|j-sÛtjd|jƒ|j.sÛt/|jƒqÛndS(Nt build_scriptstpythontbuildtinstalltreinit_subcommandstinstall_scriptstheaderstscriptstdatatpurelibtplatlibtinstall_ttnts..tinstall_purelibtinstall_platlibsinstalling to %stinstall_egg_infottargetR.s %s.dist-infot WHEEL_TOOLtsignt dist_filesRs removing %s(sheaderssscriptssdataspurelibsplatlib(stargets egginfo_dir(0treinitialize_commandt executableR0t run_commandROR%trootR*tcompiletwarn_dirtno_eptsetattrR@RARBR&Rtnormpathtinstall_libbaset install_libR/tloggertinfoRnR,Rt_ensure_relativet install_baseRDRCR-tegg2distR.twrite_wheelfilet write_recordtexiststmakedirsR tenviront subprocesstcalltgetattrREtappendRR+tdry_runR( R7RoRrRttkeytbasedir_observedRmtpseudoinstall_roott archive_roott wheel_name((s2/tmp/pip-install-0xiv62/wheel/wheel/bdist_wheel.pytrunÅsf          $           s bdist_wheel (t)c Cs>ddlm}|ƒ}d|d<||d`s sdependency_links.txttrtMETADATAs LICENSE.txt(R@RAR–tglobRBtdirnametbasenameRKtisfileR tmkdirR½tcopytreeR­treadRMR Rºtcopy(R7t egginfo_patht distinfo_pathR¿RÆtpattpossibleterrtaltt pkginfo_pathtpkg_infotdependency_links_pathtdependency_links_filetdependency_linkstlicensetlicense_filename((s2/tmp/pip-install-0xiv62/wheel/wheel/bdist_wheel.pyR“:s<   !    "c sddlm}tjj|dƒ}tjj|ˆƒ‰‡fd†}‡fd†}t|dƒ"}tj|ƒ}x |ƒD]þ} tjj| ˆƒ} || ƒr¹d} d} n[t | dƒ} | j ƒ}WdQXt j |ƒj ƒ}d t||ƒƒ} t|ƒ} tjj| ˆƒjtjjd ƒ}t|tƒrk|jtjƒƒjd ƒ}n|j|| | fƒqƒWWdQXdS( Ni(turlsafe_b64encodetRECORDc3s\xUtjˆƒD]D\}}}|jƒx(t|ƒD]}tjj||ƒVq6WqWdS(N(R@twalktsorttsortedRARB(tdirtdirstfilesRµ(R%(s2/tmp/pip-install-0xiv62/wheel/wheel/bdist_wheel.pyRÝ{s cs |ˆkS(s!Wheel hashes every possible file.((RA(trecord_relpath(s2/tmp/pip-install-0xiv62/wheel/wheel/bdist_wheel.pytskipssw+R{trbssha256=t/sutf-8(tutilRÛR@RARBtrelpathR tcsvtwriterR­RÌthashlibtsha256tdigestR tlenRR·t isinstancetbytestdecodeR_tgetfilesystemencodingtencodetwriterow(R7R%R-RÛt record_pathRÝRät record_fileRêRARèthashtsizeRµRwRí((R%Rãs2/tmp/pip-install-0xiv62/wheel/wheel/bdist_wheel.pyR•us*   '!(s bdist-dir=Rs1temporary directory for creating the distribution(s dist-dir=Rs-directory to put final built distributions inN(s skip-buildNs2skip rebuilding everything (for testing/debugging)(srelativeNs6build the archive using relative paths(default: false)(sowner=Rs@Owner name used when creating a tar file [default: current user](sgroup=R sAGroup name used when creating a tar file [default: current group](s universalNs'make a universal wheel (default: false)(s build-number=NsqBuild number for this particular version. As specified in PEP-0427, this must start with a digit. [default: None](spy-limited-api=Ns?Python tag (cp32|cp33|cpNN) for abi3 wheel tag (default: false)(t__name__t __module__t descriptionRR$Rt user_optionstboolean_optionsR8RStpropertyRCRkRnR£t wheel_versionR”R‘RºR“R•(((s2/tmp/pip-install-0xiv62/wheel/wheel/bdist_wheel.pyR-sP     & R   ;(*t__doc__RéRëR@R™R½R_RHtemail.generatorRtdistutils.coreRtdistutils.sysconfigRt distutilsRRRt pkg_resourcesRRRRRRçR R tarchiveR tpkginfoR R¹R R{RRÿRRRJRRR(((s2/tmp/pip-install-0xiv62/wheel/wheel/bdist_wheel.pyts4        "