a
    6RîhÖ  ã                   @   s(   d dl Z dd„ Zeeddœdd„ƒZdS )é    Nc                 C   s   t  ¡ dkrdd„ S | S )NÚWindowsc                  _   s   d S )N© )ÚargsÚkwargsr   r   úP/opt/python-3.9.24/usr/lib/python3.9/site-packages/setuptools/windows_support.pyÚ<lambda>   ó    zwindows_only.<locals>.<lambda>)ÚplatformÚsystem)Úfuncr   r   r   Úwindows_only   s    r   )ÚpathÚreturnc                 C   sT   ddl }ddl}|jjj}|jj|jjf|_|jj	|_
d}|| |ƒ}|sP| ¡ ‚dS )zŒ
    Set the hidden attribute on a file or directory.

    From https://stackoverflow.com/questions/19622133/

    `path` must be text.
    r   Né   )ÚctypesZctypes.wintypesZwindllZkernel32ZSetFileAttributesWZwintypesZLPWSTRZDWORDÚargtypesZBOOLÚrestypeZWinError)r   r   ZSetFileAttributesÚFILE_ATTRIBUTE_HIDDENÚretr   r   r   Ú	hide_file
   s    	


r   )r	   r   Ústrr   r   r   r   r   Ú<module>   s   