a ˆåÏhÜ@ ã @ s d Z ddlmZmZ ddlmZ ddlmZ ddlZddl Z ddl Z ddlZddlZddl mZmZmZ ddlmZ ddlmZ dd lmZmZ d d„ Zdd „ Zdd„ Zdd„ ZG dd„ deƒZe d ¡ ¡Z dd„ Z!dd„ Z"dd„ Z#dddœZ$dd„ Z%d d!„ Z&d"d#„ Z'g d$¢Z(d)d'd(„Z)dS )*z6setuptools.command.bdist_egg Build .egg distributionsé )Úremove_treeÚmkpath)Úlog)ÚCodeTypeN)Úget_build_platformÚDistributionÚensure_directory)ÚLibrary)ÚCommand)Úget_pathÚget_python_versionc C s t dƒS )NZpurelib)r © r r ú@/usr/lib/python3.9/site-packages/setuptools/command/bdist_egg.pyÚ_get_purelib s r c C s2 d| v rt j | ¡d } | d¡r.| d d… } | S )NÚ.r Úmoduleiúÿÿÿ)ÚosÚpathÚsplitextÚendswith)Úfilenamer r r Ústrip_module s r c c s6 t | ¡D ]&\}}}| ¡ | ¡ |||fV q dS )zbDo os.walk in a reproducible way, independent of indeterministic filesystem readdir order N)r ÚwalkÚsort)ÚdirÚbaseÚdirsÚfilesr r r Úsorted_walk! s r c C sJ t d¡ ¡ }t|dƒ}| || ¡ W d ƒ n1 s<0 Y d S )NaÛ def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, importlib.util __file__ = pkg_resources.resource_filename(__name__, %r) __loader__ = None; del __bootstrap__, __loader__ spec = importlib.util.spec_from_file_location(__name__,__file__) mod = importlib.util.module_from_spec(spec) spec.loader.exec_module(mod) __bootstrap__() Úw)ÚtextwrapÚdedentÚlstripÚopenÚwrite)ÚresourceÚpyfileZ_stub_templateÚfr r r Ú write_stub+ s r( c @ sŒ e Zd ZdZddddeƒ fdddd gZg d ¢Zdd„ Zd d„ Zdd„ Z dd„ Z dd„ Zdd„ Zdd„ Z dd„ Zdd„ Zdd„ Zdd „ 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-tempÚkzPkeep 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))r- r0 r, c C s. d | _ d | _d| _d | _d| _d | _d | _d S )Nr )Ú bdist_dirÚ plat_nameÚ keep_tempÚdist_dirÚ skip_buildÚ egg_outputÚexclude_source_files©Úselfr r r Úinitialize_optionsR s zbdist_egg.initialize_optionsc C s¨ | d¡ }| _|j| _| jd u r>| d¡j}tj |d¡| _| jd u rPt ƒ | _| dd¡ | jd u r¤td d |j |jtƒ | j ¡ o†| jƒ ¡ }tj | j|d ¡| _d S )NÚegg_infoZbdistZegg)r4 r4 z.egg)Úget_finalized_commandÚei_cmdr; r1 Ú bdist_baser r Újoinr2 r Zset_undefined_optionsr6 r Zegg_nameZegg_versionr ÚdistributionÚhas_ext_modulesr4 )r9 r= r> Úbasenamer r r Úfinalize_options[ s ýzbdist_egg.finalize_optionsc C sþ | j | d¡_tj tj tƒ ¡¡}| jj g }| j_ |D ]ˆ}t |tƒr´t|ƒdkr´tj |d ¡r´tj |d ¡}tj |¡}||ks˜| |tj ¡r´|t|ƒd d … |d f}| jj |¡ q:z*t d| j ¡ | jddd d W || j_ n || j_ 0 d S )NÚinstallé r é zinstalling package data to %sÚinstall_data)ÚforceÚroot)r1 r<