Your IP : 18.119.166.141
3
9��f 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 �/usr/lib/python3.6/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)Zresource�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_infoZbdistZeggr? z.egg)r? r? )�get_finalized_command�ei_cmdrE r<