관리-도구
편집 파일: bdist_egg.cpython-310.pyc
o ~�Re�@ � @ 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 )N�purelib)r � r r ��/builddir/build/BUILDROOT/alt-python310-setuptools-58.3.0-2.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/setuptools/command/bdist_egg.py�_get_purelib � 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 s8 � t �| �D ]\}}}|�� |�� |||fV qdS )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 sL t �d��� }t|d��}|�|| � W d � d S 1 sw 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/ r2 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 r(t � | _| � dd� | jd u rTtd d |j |jt� | j�� oC| j�� � }tj�| j|d �| _d S d S )N�egg_info�bdist�egg)r6 r6 z.egg)�get_finalized_command�ei_cmdr= r3 � bdist_baser r �joinr4 r �set_undefined_optionsr8 r �egg_nameZegg_versionr �distribution�has_ext_modulesr6 )r; rA rB �basenamer r r �finalize_options[ s$ ���zbdist_egg.finalize_optionsc C s� | j | �d�_tj�tj�t� ��}| jj g }| j_ |D ]D}t |t�rZt|�dkrZtj� |d �rZtj�|d �}tj�|�}||ksL|�|tj �rZ|t|�d d � |d f}| jj �|� qzt�d| j � | jddd d� W || j_ d S || j_ w )N�install� r � zinstalling package data to %s�install_data)�force�root)r3 r@ �install_libr r �normcase�realpathr rF � data_files� isinstance�tuple�len�isabs� startswith�sep�appendr �info�call_command)r; � site_packages�old�itemrR � normalizedr r r �do_install_datas s"