JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrJFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrU Qab G@sxdZddlmZddlmZmZddlmZddlm Z ddl Z ddl Z ddl Z ddl Z ddlZddlmZddlmZmZmZdd lmZdd lmZdd lmZzdd lmZmZd dZWn,ek rddlm Z mZddZYnXddZ!ddZ"ddZ#GdddeZ$e%&d'Z(ddZ)ddZ*ddZ+d d!d"Z,d#d$Z-d%d&Z.d'd(Z/d)d*d+d,gZ0d1d/d0Z1dS)2z6setuptools.command.bdist_egg Build .egg distributions)DistutilsSetupError) remove_treemkpath)log)CodeTypeN)six)get_build_platform Distributionensure_directory) EntryPoint)Library)Command)get_pathget_python_versioncCstdS)NZpurelib)rrr@/usr/lib/python3.8/site-packages/setuptools/command/bdist_egg.py _get_purelibsr)get_python_librcCstdS)NF)rrrrrrscCs2d|krtj|d}|dr.|dd}|S)N.rmodulei)ospathsplitextendswith)filenamerrr strip_module#s   rccs6t|D]&\}}}|||||fVq dS)zbDo os.walk in a reproducible way, independent of indeterministic filesystem readdir order N)rwalksort)dirbasedirsfilesrrr sorted_walk+sr"c Cs6td}t|d}|||W5QRXdS)NaR def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__, %r) __loader__ = None; del __bootstrap__, __loader__ imp.load_dynamic(__name__,__file__) __bootstrap__() w)textwrapdedentlstripopenwrite)resourcepyfileZ_stub_templatefrrr write_stub5s r,c@seZdZdZddddefdddd gZd d d gZd dZddZddZ ddZ ddZ ddZ ddZ ddZddZdd Zd!d"Zd#S)$ bdist_eggzcreate an "egg" distribution)z bdist-dir=bz1temporary directory for creating the distributionz plat-name=pz;platform name to embed in generated filenames (default: %s))exclude-source-filesNz+remove all .py files from the generated egg) keep-tempkzPkeep the pseudo-installation tree around after creating the distribution archive)z dist-dir=dz-directory to put final built distributions in) skip-buildNz2skip rebuilding everything (for testing/debugging)r1r4r0cCs.d|_d|_d|_d|_d|_d|_d|_dS)Nr) bdist_dir plat_name keep_tempdist_dir skip_build egg_outputexclude_source_filesselfrrrinitialize_optionsZszbdist_egg.initialize_optionscCs|d}|_|j|_|jdkr>|dj}tj|d|_|jdkrPt |_| dd|j dkrt dd|j |jt|jo|j }tj|j|d|_ dS)Negg_infoZbdistZegg)r8r8z.egg)get_finalized_commandei_cmdr?r5 bdist_baserrjoinr6rZset_undefined_optionsr:r Zegg_nameZ egg_versionr distributionhas_ext_modulesr8)r=rArBbasenamerrrfinalize_optionscs$     zbdist_egg.finalize_optionscCs|j|d_tjtjt}|jj g}|j_ |D]}t |t rt |dkrtj |drtj|d}tj|}||ks||tjr|t |dd|df}|jj |q:z"td|j|jddddW5||j_ XdS)Ninstallrzinstalling package data to %s install_data)forceroot)r5r@ install_librrnormcaserealpathrrD data_files isinstancetuplelenisabs startswithsepappendrinfo call_command)r=Z site_packagesolditemrPZ normalizedrrrdo_install_data{s"  zbdist_egg.do_install_datacCs|jgS)N)r:r<rrr get_outputsszbdist_egg.get_outputscKsPtD]}|||jq|d|j|d|j|j|f|}|||S)z8Invoke reinitialized command `cmdname` with keyword argsr9dry_run)INSTALL_DIRECTORY_ATTRS setdefaultr5r9r_Zreinitialize_command run_command)r=ZcmdnamekwdirnamecmdrrrrZs zbdist_egg.call_commandcCs|dtd|j|d}|j}d|_|jrH|jsH|d|j ddd}||_| \}}g|_ g}t |D]|\}}t j|\} } t j|jt| d} |j | td ||jstt j|| || |t jd ||<qz|r|||jjr||j} t j| d } || |jjrlt j| d }td ||j d|dd|| t j| d}|rtd||jst|t|d}| d|| d|!n,t j"|rtd||jst #|t$t j| d |%t j&t j|j'dr.+)\.(?P[^.]+)\.pycname.pyczRenaming file from [%s] to [%s])rrYwalk_eggr5rrrCrdebugrwrematchpardirgroupremoveOSErrorrename) r=rr r!rrZpath_oldpatternmZpath_newrrrr|s4       zbdist_egg.zap_pyfilescCs2t|jdd}|dk r|Stdt|j|jS)Nryz4zip_safe flag not set; analyzing archive contents...)rrDrr{ analyze_eggr5rq)r=saferrrry s  zbdist_egg.zip_safec Cst|jjpd}|did}|dkr0dS|jr<|jrJtd|fdjt j }|j }d |j}|jd}t j|j}d t}|jstt j|j|jd t|jd} | || d S) Nzsetuptools.installationZ eggsecutabler#zGeggsecutable entry point (%r) cannot have 'extras' or refer to a modulez{}.{}rraH#!/bin/sh if [ `basename $0` = "%(basename)s" ] then exec python%(pyver)s -c "import sys, os; sys.path.insert(0, os.path.abspath('$0')); from %(pkg)s import %(base)s; sys.exit(%(full)s())" "$@" else echo $0 is not the correct name for this egg file. echo Please rename it back to %(basename)s and try again. exec false fi roa)r Z parse_maprDZ entry_pointsgetZattrsZextrasrformatsys version_infoZ module_namerCrrrFr:localsr_rrdr'r(ru) r=ZepmZepZpyverpkgZfullrrFheaderr+rrrr~s0       zbdist_egg.gen_headercCshtj|j}tj|d}|jjjD]<}||r&tj||t |d}t || ||q&dS)z*Copy metadata (egg info) to the target_dirrN) rrnormpathr?rCrAZfilelistr!rVrTr Z copy_file)r=Z target_dirZ norm_egg_infoprefixrtargetrrrrt:s zbdist_egg.copy_metadata_toc Csg}g}|jdi}t|jD]f\}}}|D].}tj|dtkr*||||q*|D]"}|||d|tj||<q^q|j r| d}|j D]Z} t | trq|| j} || }tj|dstjtj|j|r||q||fS)zAGet a list of relative paths to C extensions in the output distrorrJrgZ build_extzdl-)r5r"rrrlowerNATIVE_EXTENSIONSrXrCrDrEr@ extensionsrRr Zget_ext_fullnamerZget_ext_filenamerFrVrz) r=rrpathsrr r!rZ build_cmdrfullnamerrrrpFs0        zbdist_egg.get_ext_outputsN)__name__ __module__ __qualname__ descriptionrZ user_optionsZboolean_optionsr>rGr]r^rZrr|ryr~rtrprrrrr-Cs2  Q' r-z.dll .so .dylib .pydccsHt|}t|\}}}d|kr(|d|||fV|D] }|Vq8dS)z@Walk an unpacked egg's contents, skipping the metadata directoryrhN)r"nextr)egg_dirZwalkerrr r!Zbdfrrrrfs  rc CstD](\}}tjtj|d|r|Sqtst||krzt|q|dk rt||krt|d}| d| qdS)Nrkrl) rrrrrCrzboolrwr'r(ru)rrrrr+rrrrxs    rxzzip-safez not-zip-safe)TFc Cstj||}|dd|kr"dS|t|ddtjd}||rJdpLdtj|d}tjrld}nt j d kr|d }nd }t |d }| |t |} |d} tt| } d D]} | | krtd|| d} qd| kr dD]} | | krtd|| d} q| S)z;Check whether module possibly uses unsafe-for-zipfile stuffNTrJrrr) rb)__file____path__z%s: module references %sFinspect) Z getsourceZ getabsfileZ getsourcefileZgetfilegetsourcelinesZ findsourceZ getcommentsZ getframeinfoZgetinnerframesZgetouterframesstackZtracez"%s: module MAY be using inspect.%s)rrrCrTrsrWrrZPY2rrr'readmarshalloadrudictfromkeys iter_symbolsrr{) rrrrqrrrskipr+coderZsymbolsZbadrrrrs4      rccsT|jD] }|Vq|jD]6}t|tjr0|Vqt|trt|D] }|VqBqdS)zBYield names and strings used by `code` and its nested code objectsN)co_names co_constsrRrZ string_typesrr)rrconstrrrrs     rcCs2tjdstjdkrdStdtddS)NjavaZcliTz1Unable to analyze compiled code on this platform.zfPlease ask the author to include a 'zip_safe' setting (either True or False) in the package's setup.py)rplatformrVrr{rrrrrs rrNrjrKZ install_baseTr#c sddl}ttj|dtd|fdd}|rB|jn|j}s|j |||d} t D]\} } } || | | qd| n t D]\} } } |d| | q|S)aqCreate a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search path). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip file. rNroz#creating '%s' and adding '%s' to itcs`|D]V}tjtj||}tj|r|tdd}sN|||td|qdS)NrJz adding '%s') rrrrCrvrTr(rr)zrdnamesrrr/base_dirr_rrvisits  zmake_zipfile..visit) compression) zipfilerrrrdrrYZ ZIP_DEFLATEDZ ZIP_STOREDZZipFiler"ru) Z zip_filenamerrmr_compressrnrrrrrdr r!rrrr}s  r})rrTr#)2__doc__Zdistutils.errorsrZdistutils.dir_utilrrZ distutilsrtypesrrrrr$rZsetuptools.externrZ pkg_resourcesrr r r Zsetuptools.extensionr Z setuptoolsr Z sysconfigrrr ImportErrorZdistutils.sysconfigrrr"r,r-rrsplitrrrrxrrrrr`r}rrrrsX         " $