3
pd]                 @   s   d dl Zd dlZd dlZd dlZdddddddd	d
dddddddddddddddddZddddddd d!Zejed"d#d$Z	d+eee
ed(d)d*ZdS ),    Nz4.6.0z1.2.1z0.7.4z0.3.2z0.6.0z3.8.0z2.2.2z2.6.2z1.3.0z2.5.7z0.12.0z0.13.0z3.4.3z5.0.1z1.0.6z0.4.0z1.2.0z1.1.4z0.8.3z0.8.2z1.1.0z0.9.8z0.46.0)bs4
bottleneckZfsspecZfastparquetZgcsfsz
lxml.etreeZ
matplotlibZnumexprodfpyZopenpyxl
pandas_gbqZpyarrowZpytablesZpytestZpyxlsbZs3fsZscipy
sqlalchemyZtablestabulateZxarrayZxlrdZxlwtZ
xlsxwriterZnumbaZbeautifulsoup4Z
Bottlenecklxmlr   z
pandas-gbqZ
SQLAlchemyZJinja2)r   r   z
lxml.etreeZodfr   r   Zjinja2)modulereturnc             C   s<   t | dd }|d kr t | dd }|d kr8td| j |S )N__version__Z__VERSION__zCan't determine version for )getattrImportError__name__)r	   version r   9/tmp/pip-build-7vycvbft/pandas/pandas/compat/_optional.py_get_version2   s    r    Traise)nameextraraise_on_missing
on_versionc       
      C   s   t j| }|dk	r|n| }d| d| d| d}ytj| }W n( tk
rh   |r`t|dndS Y nX tj| }|rt|}	tjj	|	|k r|dkst
d	| d
|  d|	 d}|dkrtj|t dS |dkrt||S )a  
    Import an optional dependency.

    By default, if a dependency is missing an ImportError with a nice
    message will be raised. If a dependency is present, but too old,
    we raise.

    Parameters
    ----------
    name : str
        The module name. This should be top-level only, so that the
        version may be checked.
    extra : str
        Additional text to include in the ImportError message.
    raise_on_missing : bool, default True
        Whether to raise if the optional dependency is not found.
        When False and the module is not present, None is returned.
    on_version : str {'raise', 'warn'}
        What to do when a dependency's version is too old.

        * raise : Raise an ImportError
        * warn : Warn that the version is too old. Returns None
        * ignore: Return the module, even if the version is too old.
          It's expected that users validate the version locally when
          using ``on_version="ignore"`` (see. ``io/html.py``)

    Returns
    -------
    maybe_module : Optional[ModuleType]
        The imported module, when found and the version is correct.
        None is returned when the package is not found and `raise_on_missing`
        is False, or when the package's version is too old and `on_version`
        is ``'warn'``.
    NzMissing optional dependency 'z'. z Use pip or conda to install .warnr   ignorezPandas requires version 'z' or newer of 'z' (version 'z' currently installed).>   r   r   r   )INSTALL_MAPPINGget	importlibimport_moduler   VERSIONSr   	distutilsr   LooseVersionAssertionErrorwarningsr   UserWarning)
r   r   r   r   package_nameZinstall_namemsgr	   Zminimum_versionr   r   r   r   import_optional_dependency=   s*    &


r(   )r   Tr   )distutils.versionr!   r   typesr$   r    r   
ModuleTypestrr   boolr(   r   r   r   r   <module>   sJ   