AlkantarClanX12

Your IP : 3.143.203.129


Current Path : /opt/alt/python34/lib/python3.4/site-packages/pip/commands/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib/python3.4/site-packages/pip/commands/__pycache__/freeze.cpython-34.pyc

�
�Re8�@s�ddlZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZGdd�de�Z
dS)	�N)�InstallRequirement)�logger)�Command)�get_installed_distributions)�
pkg_resourcescsReZdZdZdZdZdZ�fdd�Zdd�Zdd	�Z	�S)
�
FreezeCommandz1Output installed packages in requirements format.�freezez
      %prog [options]c
s�tt|�j||�|jjdddddddddd	d
d�|jjdd
dddddgddd
d�|jjddddddddd
d�|jjd|j�dS)Nz-rz
--requirement�dest�requirement�action�store�default�metavar�file�helpzVUse the order in the given requirements file and it's comments when generating output.z-fz--find-links�
find_links�append�URLz<URL for finding packages, which will be added to the output.z-lz--local�local�
store_trueFzUIf in a virtualenv that has global access, do not output globally-installed packages.r)�superr�__init__�cmd_opts�
add_option�parser�insert_option_group)�self�args�kw)�	__class__��./tmp/pip-ztkk0jow-build/pip/commands/freeze.pyrs,						zFreezeCommand.__init__cCstj�dS)N)r�move_stdout_to_stderr)rr r r!�
setup_logging-szFreezeCommand.setup_loggingcCs�|j}|jpg}|j}d}d}|j}|rNtj|�}ng}	tj}
x9tj	D].}|j
d�rg|	j|jd��qgqgWx*|D]"}d|kr�|	j
|�q�q�Wx|D]}|
jd|�q�Wi}
x?td|�D].}tjj||	d|�}||
|j<q�W|rrt|�}x|D]}|j�sq|j�jd�r�|
j|�qIn|r�|j|�r�|
j|�qIn/|jd�s�|jd	�r2|jd�r�|d
d�j�}n%|td	�d�j�jd�}tj|d|j�}n�|jd
�s�|jd�s�|jd�s�|jd�s�|jd�s�|jd�s�|jd�s�|jd�s�|jd�r�|
j|�qIntj|�}|jstjd|j��tjd�qIn|j|
kr:tj d|j��qIn|
jt!|
|j��|
|j=qIW|
jd�nx9t"|
j#�ddd��D]}|
jt!|��q�WdS)NFzdependency_links.txtz#egg=z-f %s
�
local_only�	find_tags�#z-ez
--editable��=�default_vcsz-rz
--requirementz-Zz--always-unzipz-fz-iz--extra-index-urlz--find-linksz--index-urlz>Skipping line because it's not clear what it would install: %sz9  (add #egg=PackageName to the URL to avoid this warning)z?Requirement file contains %s, but that package is not installedz:## The following requirements were added by pip --freeze:
�keycSs|jS)N)�name)�xr r r!�<lambda>qsz#FreezeCommand.run.<locals>.<lambda>)$r
rr�skip_requirements_regex�re�compile�sys�stdoutr�working_set�has_metadata�extend�get_metadata_linesr�writer�pip�FrozenRequirement�	from_distr+�open�strip�
startswith�search�len�lstripr�
from_editabler)�	from_liner�notify�warn�str�sorted�values)r�optionsrr
rr$r%�
skip_match�
skip_regex�dependency_links�f�dist�link�
installations�req�req_f�line�line_req�installationr r r!�run0sv				


"

%
		
	%zFreezeCommand.run)
�__name__�
__module__�__qualname__�__doc__r+�usage�summaryrr#rUr r )rr!rsr)r/r1r8�pip.reqr�pip.logr�pip.basecommandr�pip.utilr�pip._vendorrrr r r r!�<module>s