File: //opt/python38/lib/python3.8/site-packages/setuptools/command/__pycache__/bdist_egg.cpython-38.pyc
U
�i�_�G � @ s� d Z ddlmZ ddlmZmZ ddlmZ ddlm Z ddl
Z
ddlZddlZddl
Z
ddlZddlZddlmZ ddlmZmZmZ dd lmZ dd
lmZ ddlmZmZ zddlmZmZ d
d� ZW n, e k
r� ddl!m"Z"mZ dd� ZY nX dd� Z#dd� Z$dd� Z%G dd� de�Z&e'�(d�)� �Z*dd� Z+dd� Z,dd� Z-d d!d"�Z.d#d$� Z/d%d&� Z0d'd(� Z1d)d*d+d,gZ2d1d/d0�Z3dS )2z6setuptools.command.bdist_egg
Build .egg distributions� )�DistutilsSetupError)�remove_tree�mkpath)�log)�CodeTypeN)�six)�get_build_platform�Distribution�ensure_directory)�
EntryPoint)�Library)�Command�SetuptoolsDeprecationWarning)�get_path�get_python_versionc C s t d�S )N�purelib)r � r r �@/tmp/pip-unpacked-wheel-tlqm5ymo/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 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 s6 t �d��� }t|d��}|�|| � W 5 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_stub6 s r. c @ s� e Zd ZdZdddde� fdddd gZd
ddgZd
d� Zdd� Zdd� Z dd� Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd � 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-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)r3 r6 r2 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_options[ s zbdist_egg.initialize_optionsc C s� | � d� }| _|j| _| jd kr>| � d�j}tj�|d�| _| jd krPt � | _| �
dd� | jd kr�td d |j
|jt� | j�� o�| j��
� }tj�| j|d �| _d S )N�egg_info�bdistZegg)r: r: z.egg)�get_finalized_command�ei_cmdrA r7 �
bdist_baser r �joinr8 r �set_undefined_optionsr<