Spade
Mini Shell
| Directory:~$ /proc/self/root/usr/lib64/python3.6/distutils/command/__pycache__/ |
| [Home] [System Details] [Kill Me] |
3
\+
�@sddZddlmZddlmZmZddlZddlZddlZGdd�de�Z dd�Z
d d
�Zdd�ZdS)
z�distutils.command.install_egg_info
Implements the Distutils 'install_egg_info' command, for
installing
a package's PKG-INFO
metadata.�)�Command)�log�dir_utilNc@s:eZdZdZdZdgZdd�Zdd �Zd
d�Zdd
�Z dS)�install_egg_infoz)Install an .egg-info file for
the packagez8Install package's PKG-INFO metadata as an .egg-info
file�install-dir=�d�directory to install tocCs
d|_dS)N)�install_dir)�self�r�(/usr/lib64/python3.6/install_egg_info.py�initialize_optionssz#install_egg_info.initialize_optionscCsb|jdd�dtt|jj���tt|jj���ftjdd��}t j
j|j|�|_
|j
g|_dS)NZinstall_libr z%s-%s-py%d.%d.egg-info�)r r )Zset_undefined_options�to_filename� safe_name�distributionZget_name�safe_versionZget_version�sys�version_info�os�path�joinr �target�outputs)r
�basenamerrr�finalize_optionssz!install_egg_info.finalize_optionsc Cs�|j}tjj|�r2tjj|�r2tj||jd�nNtjj|�rX|j tj
|jfd|�n(tjj|j�s�|j tj|jfd|j�t
jd|�|js�t|ddd��}|jjj|�WdQRXdS)N)�dry_runz Removing
z Creating z
Writing
%s�wzUTF-8)�encoding)rrr�isdir�islinkrZremove_treer�existsZexecute�unlinkr �makedirsr�info�openrZmetadataZwrite_pkg_file)r
r�frrr�run
szinstall_egg_info.runcCs|jS)N)r)r
rrr�get_outputs.szinstall_egg_info.get_outputsN)rrr)
�__name__�
__module__�__qualname__�__doc__�descriptionZuser_optionsr
rr'r(rrrrrs
rcCstjdd|�S)z�Convert an arbitrary string to a standard
distribution name
Any runs of non-alphanumeric/. characters are replaced with a single
'-'.
z[^A-Za-z0-9.]+�-)�re�sub)�namerrrr6srcCs|jdd�}tjdd|�S)z�Convert
an arbitrary string to a standard version string
Spaces become dots, and all other non-alphanumeric characters become
dashes, with runs of multiple dashes condensed to a single dash.
�
�.z[^A-Za-z0-9.]+r.)�replacer/r0)�versionrrrr>srcCs|jdd�S)z|Convert
a project or version name to its filename-escaped form
Any '-' characters are currently replaced with '_'.
r.�_)r4)r1rrrrHsr)
r,Z
distutils.cmdrZ distutilsrrrrr/rrrrrrrr�<module>s+