3
K”Re G ã @ sx d Z ddlmZ ddlmZmZ ddlmZ ddlm Z ddl
Z
ddlZddlZddl
Z
ddlZddlmZ ddlmZmZmZ dd lmZ dd
lmZ ddlmZ yddlmZmZ d
d„ ZW n, ek
rì ddlm Z mZ dd„ ZY nX dd„ Z!dd„ Z"dd„ Z#G dd„ deƒZ$e%j&dj'ƒ ƒZ(dd„ Z)dd„ Z*dd„ Z+d d!d"œZ,d#d$„ Z-d%d&„ Z.d'd(„ Z/d)d*d+d,gZ0d1d/d0„Z1dS )2z6setuptools.command.bdist_egg
Build .egg distributionsé )ÚDistutilsSetupError)Úremove_treeÚmkpath)Úlog)ÚCodeTypeN)Úsix)Úget_build_platformÚDistributionÚensure_directory)Ú
EntryPoint)ÚLibrary)ÚCommand)Úget_pathÚget_python_versionc C s t dƒS )NÚpurelib)r © r r ú’/builddir/build/BUILDROOT/alt-python36-setuptools-38.5.2-7.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/setuptools/command/bdist_egg.pyÚ_get_purelib s r )Úget_python_libr c C s t dƒS )NF)r r r r r r s c C s2 d| krt jj| ƒd } | jdƒr.| d d… } | S )NÚ.r Úmoduleé iúÿÿÿ)ÚosÚpathÚsplitextÚendswith)Úfilenamer r r Ústrip_module# s
r c c s: x4t j| ƒD ]&\}}}|jƒ |jƒ |||fV qW 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 s6 t jdƒjƒ }t|dƒ�}|j|| ƒ W d Q R X d S )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)ÚtextwrapÚdedentÚlstripÚopenÚwrite)ÚresourceÚpyfileZ_stub_templateÚfr r r Ú
write_stub5 s
r. c @ sŽ e Zd ZdZd*dddeƒ fd+d-d.d/gZdddgZdd„ Zdd„ Zdd„ Z dd„ Z
dd„ Zdd„ Zd d!„ Z
d"d#„ Zd$d%„ Zd&d'„ Zd(d)„ Zd S )0Ú bdist_eggzcreate an "egg" distributionú
bdist-dir=Úbú1temporary directory for creating the distributionz
plat-name=Úpz;platform name to embed in generated filenames (default: %s)úexclude-source-filesNú+remove all .py files from the generated eggú keep-tempÚkz/keep the pseudo-installation tree around after z!creating the distribution archiveú dist-dir=Údú-directory to put final built distributions inú
skip-buildú2skip rebuilding everything (for testing/debugging)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_optionsZ s zbdist_egg.initialize_optionsc C s¨ | j dƒ }| _|j| _| jd kr>| j dƒj}tjj|dƒ| _| jd krPt ƒ | _| j
ddƒ | jd kr¤td d |j
|jtƒ | jjƒ o†| jƒj
ƒ }tjj| j|d ƒ| _d S )NÚegg_infoÚbdistZeggr@ z.egg)r@ r@ )Úget_finalized_commandÚei_cmdrF r= Ú
bdist_baser r Újoinr> r Úset_undefined_optionsrB r Úegg_nameZegg_versionr ÚdistributionÚhas_ext_modulesr@ )rD rI rJ Úbasenamer r r Úfinalize_optionsc s
zbdist_egg.finalize_optionsc C sú | j | jdƒ_tjjtjjtƒ ƒƒ}| jj g }| j_ x�|D ]ˆ}t
|tƒr¶t|ƒdkr¶tjj
|d ƒr¶tjj|d ƒ}tjj|ƒ}||ksš|j|tj ƒr¶|t|ƒd d … |d f}| jj j|ƒ q