File: //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/python.cpython-36.pyc
3
3��d � @ sz d dl mZmZmZmZmZ d dlmZ d dlZd dl Z d dl
Z
G dd� de�ZG dd� deee�ZG dd � d ee�Z
dS )
� )�Plugin�RedHatPlugin�DebianPlugin�UbuntuPlugin� PluginOpt)�
RHELPolicyNc @ s, e Zd ZdZdZdZd Zd
ZdZdd� Z dS )�PythonznCaptures information on the installed python runtime(s), as well as
python modules installed via pip.
zPython runtime�python�systemz python -Vc C sV | j | jdd� | jd�}|d dkrRx*|d j� dd � D ]}| j d| � q<W d S ) Nzpython-version)Zsuggest_filenamezwhereis pip -bZstatusr �output� z%s list installed)�add_cmd_output�python_versionZexec_cmd�split)�selfZpipsZpip� r �/usr/lib/python3.6/python.py�setup! s
zPython.setupN)r
)r )
�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofiles�packagesr r r r r r r s r c @ s e Zd ZdZdZdS )�UbuntuPythonz
python3 -V�python3N)r )r r r r r r r r r r . s r c sD e Zd ZdZdZeddd d
�gZ� fdd�Zd
d� Zdd� Z � Z
S )�RedHatPythona In addition to the base information, on Red Hat family distributions the
python plugin also supports the 'hashes' option. If enabled, this plugin
will generate a json-formatted listing of all pyfiles within the
distribution-standard python package installation locations.
r �python36�python2r �platform-python�hashesFz#collect hashes for all python files)�defaultZdescc s@ | j ddg� t| jt�r.| jj� dkr.d| _tt| �j� d S )Nz
python2 -Vz
python3 -V� z/usr/libexec/platform-python -V) r
�
isinstanceZpolicyr Zdist_versionr �superr r )r )� __class__r r r A s
zRedHatPython.setupc C s<