3
®yb6  ã               @   sÐ   d Z ddlZddlZddlZddlZddlmZ ejdkZejdkZ	ejdkZ
ejƒ dkZejd kZeeedœdd„Zedœdd„Zedœdd„Zedœdd„Zedœdd„Zedœdd„Zdd„ Zdd„ ZdS )!zn
compat
======

Cross-compatible functions for different versions of Python.

Other items:
* platform checker
é    N)ÚFé   é   é   é	   ÚPyPyé   é    )ÚfÚnameÚreturnc             C   s$   || _ |j › d|› �| _|j| _| S )z<
    Bind the name/qualname attributes of the function.
    Ú.)Ú__name__Ú__qualname__Ú
__module__)r
   r   Úcls© r   ú:/tmp/pip-install-4cy230dp/pandas/pandas/compat/__init__.pyÚset_function_name    s    r   )r   c               C   s
   t jdkS )z•
    Checking if the running platform is little endian.

    Returns
    -------
    bool
        True if the running platform is little endian.
    Úlittle)ÚsysÚ	byteorderr   r   r   r   Úis_platform_little_endian+   s    	r   c               C   s   t jdkpt jdkS )z‰
    Checking if the running platform is windows.

    Returns
    -------
    bool
        True if the running platform is windows.
    Úwin32Úcygwin)r   Úplatformr   r   r   r   Úis_platform_windows7   s    	r   c               C   s
   t jdkS )z…
    Checking if the running platform is linux.

    Returns
    -------
    bool
        True if the running platform is linux.
    Zlinux2)r   r   r   r   r   r   Úis_platform_linuxC   s    	r   c               C   s
   t jdkS )z�
    Checking if the running platform is mac.

    Returns
    -------
    bool
        True if the running platform is mac.
    Údarwin)r   r   r   r   r   r   Úis_platform_macO   s    	r   c               C   s   t jdƒd dk S )z‡
    Checking if the running platform is 32-bit.

    Returns
    -------
    bool
        True if the running platform is 32-bit.
    ÚPr   é@   )ÚstructÚcalcsizer   r   r   r   Úis_platform_32bit[   s    	r$   c              C   s4   yddl } | S  tk
r.   d}tj|ƒ Y nX dS )zh
    Importing the `lzma` module.

    Warns
    -----
    When the `lzma` module is not available.
    r   NzˆCould not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.)ÚlzmaÚImportErrorÚwarningsÚwarn)r%   Úmsgr   r   r   Ú_import_lzmag   s    r*   c             C   s   | dkrt dƒ‚| jS )a
  
    Importing the `LZMAFile` class from the `lzma` module.

    Returns
    -------
    class
        The `LZMAFile` class from the `lzma` module.

    Raises
    ------
    RuntimeError
        If the `lzma` module was not imported correctly, or didn't exist.
    Nzslzma module not available. A Python re-install with the proper dependencies, might be required to solve this issue.)ÚRuntimeErrorÚLZMAFile)r%   r   r   r   Ú_get_lzma_file{   s    r-   )r   r   )r   r   )r   r   l        )Ú__doc__r   r"   r   r'   Zpandas._typingr   Úversion_infoZPY37ZPY38ZPY39Úpython_implementationZPYPYÚmaxsizeZIS64Ústrr   Úboolr   r   r   r   r$   r*   r-   r   r   r   r   Ú<module>	   s$   



