Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
_path.cpython-313.pyc49 linesDownload Raw Back to __pycache__
1�

2��j����%SSKJr SSKrSSKrSSKrSSKJrJrJr SSK	J3r4 \(aSSKJr \\
\R\
4rS\S'\"S\\
\R\
4S	9rS5rSSjrSSjrSS
jr\R,S5rg)�)�annotationsN)�
TYPE_CHECKING�TypeVar�Union)�unique_everseen)�	TypeAliasr�StrPath�StrPathT)�boundc�l�[RRU5n[R"USS9 g)z1Ensure that the parent directory of `path` existsT)�exist_okN)�os�path�dirname�makedirs)rrs  �VD:\code\apps\devtools\python\user_packages\Python313\site-packages\setuptools/_path.py�ensure_directoryrs"���g�g�o�o�d�#�G��K�K��$�'�c�0�[U5[U5:H$)aYDiffers from os.path.samefile because it does not require paths to exist.6Purely string based (no comparison between i-nodes).7>>> same_path("a/b", "./a/b")8True9>>> same_path("a/b", "a/./b")10True11>>> same_path("a/b", "././a/b")12True13>>> same_path("a/b", "./a/b/c/..")14True15>>> same_path("a/b", "../a/b/c")16False17>>> same_path("a", "a/b")18False19)�normpath)�p1�p2s  r�	same_pathrs�� �B�<�8�B�<�'�'rc�l�[RS:Xa[RR	U5$U$)z�20Contrary to POSIX 2008, on Cygwin, getcwd (3) contains21symlink components. Using22os.path.abspath() works around this limitation. A fix in os.getcwd()23would probably better, in Cygwin even more so, except24that this seems to be by design...25�cygwin)�sys�platformrr�abspath��filenames r�
_cygwin_patchr!*s'��),����(@�2�7�7�?�?�8�$�N�h�Nrc	���[RR[RR[RR	[U5555$)z2Normalize a file/dir name for comparison purposes.)rr�normcase�realpathrr!rs rrr5s:��
�7�7���B�G�G�,�,�R�W�W�-=�-=�m�H�>U�-V�W�X�Xrc#�p# �[5n[RRSU5n[RRSS5n[RR[
U55n[SXC/5n[RRU5nU(aU[RS'Sv� X!La![RRSS5 gU[RS'g!X!La![RRSS5 fU[RS'f=f7f)at26Add the indicated paths to the head of the PYTHONPATH environment27variable so that subprocesses will also see the packages at28these paths.29 30Do this in a context that restores the value on exit.31 32>>> getfixture('monkeypatch').setenv('PYTHONPATH', 'anything')33>>> with paths_on_pythonpath(['foo', 'bar']):34...     assert 'foo' in os.environ['PYTHONPATH']35...     assert 'anything' in os.environ['PYTHONPATH']36>>> os.environ['PYTHONPATH']37'anything'38 39>>> getfixture('monkeypatch').delenv('PYTHONPATH')40>>> with paths_on_pythonpath(['foo', 'bar']):41...     assert 'foo' in os.environ['PYTHONPATH']42>>> os.environ.get('PYTHONPATH')43�44PYTHONPATH�N)	�objectr�environ�get�pathsep�joinr�filter�pop)�paths�nothing�orig_pythonpath�current_pythonpath�prefix�to_join�new_paths       r�paths_on_pythonpathr6:s����*�h�G��j�j�n�n�\�7�;�O�������b�9��7��������!7�8�����;�<���:�:�?�?�7�+���'/�B�J�J�|�$�
��%��J�J�N�N�<��.�'6�B�J�J�|�$���%��J�J�N�N�<��.�'6�B�J�J�|�$�s�AD6�A2C9�9D6�9:D3�3D6)rr	rr	�return�bool)r r	)r r	r7�str)�45__future__r�46contextlibrr�typingrrr�more_itertoolsr�typing_extensionsrr9�PathLiker	�__annotations__r47rrr!r�contextmanagerr6�rr�<module>rCs���"��	�48�0�0�*��+��3����C� 0�0�1���1��:�U�3����C�0@�+@�%A�B��(�(�&O�Y�49���"7��"7r
codekingpro/portable-devtools · Team Ai