HOME


sh-3ll 1.0
DIR:/usr/local/lib64/python3.6/site-packages/pandas/util/__pycache__/
Upload File :
Current File : //usr/local/lib64/python3.6/site-packages/pandas/util/__pycache__/_print_versions.cpython-36.pyc
3

���h��@s�ddlZddlZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
ddlmZddl
mZmZmZe	ed�dd�Zeeefd�dd	�Zeeefd�d
d�Zde
eefdd
�dd�Zed�dd�Zedkr�eje��dS)�N)�Dict�Optional�Union)�JSONSerializable)�VERSIONS�_get_version�import_optional_dependency)�returncCsddlm}|�}|dS)za
    Use vendored versioneer code to get git hash, which handles
    git worktree correctly.
    r)�get_versionszfull-revisionid)Zpandas._versionr
)r
�versions�r�=/tmp/pip-build-5_djhm0z/pandas/pandas/util/_print_versions.py�_get_commit_hashsrcCsrtj�}tj�\}}t�djdd�tjD��tj	d�d|j
|j|j|j
|jtjtjjd�tjjd�||d�d	�S)
zG
    Returns system information as a JSON serializable dictionary.
    �.css|]}t|�VqdS)N)�str)�.0�irrr
�	<genexpr>!sz _get_sys_info.<locals>.<genexpr>�P��LC_ALL�LANG)z
language-code�encoding)�commit�pythonzpython-bitsZOSz
OS-release�Version�machine�	processor�	byteorderrr�LOCALE)�platform�uname�locale�	getlocaler�join�sys�version_info�struct�calcsize�system�release�versionrrr�os�environ�get)�uname_result�
language_coderrrr
�
_get_sys_infos

r1cCsrddddddddd	d
ddd
dddddddg}|jtt��i}x.|D]&}t|ddd�}|rbt|�nd||<qDW|S)zK
    Returns dependency information as a JSON serializable dictionary.
    ZpandasZnumpyZpytzZdateutil�pip�
setuptoolsZCythonZpytestZ
hypothesisZsphinxZbloscZfeatherZ
xlsxwriterz
lxml.etree�html5libZpymysqlZpsycopg2Zjinja2ZIPythonZpandas_datareaderF�ignore)Zraise_on_missingZ
on_versionN)�extend�listrrr)�deps�result�modname�modrrr
�_get_dependency_info/s6
r<F)�as_jsonr	c
Cs6t�}t�}|rjt||d�}|dkr.t|�n:t|t�s<t�tj|ddd��}t	j
||dd�WdQRXn�t|d	t�s|t�|d	d
}|d	d}|�d|��|d	<td
d�|D��}td�td�x.|j�D]"\}}	t|d|���d|	���q�Wtd�x0|j�D]$\}}	t|d|���d|	����q
WdS)a
    Provide useful information, important for bug reports.

    It comprises info about hosting operation system, pandas version,
    and versions of other installed relative packages.

    Parameters
    ----------
    as_json : str or bool, default False
        * If False, outputs info in a human readable form to the console.
        * If str, it will be considered as a path to a file.
          Info will be written to that file in JSON format.
        * If True, outputs info in JSON format to the console.
    )r)ZdependenciesT�wb�utf8)r�)�indentNrz
language-coderrcss|]}t|�VqdS)N)�len)r�xrrr
r|sz show_versions.<locals>.<genexpr>z
INSTALLED VERSIONSz------------------�<z: �)
r1r<�dict�print�
isinstancer�AssertionError�codecs�open�json�dump�max�items)
r=Zsys_infor8�j�fr0r�maxlen�k�vrrr
�
show_versionsZs*
rUcCsRddlm}|�}|jdddddd�|j�\}}|jd	krBd
|_t|jd�dS)Nr)�OptionParserz-jz--json�FILE�z>Save output as JSON into file, pass in '-' to output to stdout)�metavar�nargs�help�-T)r=)�optparserV�
add_option�
parse_argsrLrU)rV�parser�options�argsrrr
�main�s
rc�__main__)F)rJrLr"r,r r'r%ZtypingrrrZpandas._typingrZpandas.compat._optionalrrrrrr1r<�boolrU�intrc�__name__�exitrrrr
�<module>s +,