
    n&phi                     P    S r SSKrSSKrSSKJr  SSKJr  SSKJr   " S S5      r	g)	zinstall_scripts tests    N)install_scripts)Distribution   )contextsc                      \ rS rSr\" SSS/0SS9rSrSrS	rSS jr	\
R                  R                  \R                  S:H  SS9S 5       r\
R                  R                  \R                  S:g  SS9S 5       r\
R                  R                  \R                  S:H  SS9S 5       r\
R                  R                  \R                  S:g  SS9S 5       rSrg
)TestInstallScripts   fooconsole_scriptszfoo=foo:fooz0.0)nameentry_pointsversionz%/usr/dummy-test-path/local/bin/pythonz/usr/bin/env dummy-test-pythonz6C:\Dummy Test Path\Program Files\Python 3.6\python.exeNc                 0   [        U R                  5      nSUl        [        U5      nXl        Ub  UR                  S5      nX%l        UR                  5         [        R                  " 5          UR                  5         S S S 5        g ! , (       d  f       g = f)Nzsetup.pybuild_scripts)r   settingsscript_namer   install_dirget_finalized_command
executableensure_finalizedr   quietrun)selfr   r   distcmdbss         X/var/www/html/venv/lib/python3.13/site-packages/setuptools/tests/test_install_scripts.py_run_install_scripts'TestInstallScripts._run_install_scripts   sm    DMM*%d#%!**?;B&M^^GGI s   -B
Bwin32znon-Windows only)reasonc                    SU R                    S3nUR                  SU R                   5        UR                  5          U R                  [	        U5      5        [        [	        UR                  S5      5      SSS9 nUR                  5       nSSS5        SSS5        WU:X  d   eg! , (       d  f       N= f! , (       d  f       N(= f)	z\
Ensure that shebang is not quoted on Unix when getting the Python exe
from sys.executable.
#!
sys.executabler
   rutf-8encodingN)unix_exesetattras_cwdr   stropenjoinreadliner   tmpdirmonkeypatchexpectedfactuals         r   !test_sys_executable_escaping_unix4TestInstallScripts.test_sys_executable_escaping_unix#   s     b),dmm<]]_%%c&k2c&++e,-sWE F  !!! FE _#   >B6;B%B6%
B3	/B66
CzWindows onlyc                    SU R                    S3nUR                  SU R                   5        UR                  5          U R                  [	        U5      5        [        [	        UR                  S5      5      SSS9 nUR                  5       nSSS5        SSS5        WU:X  d   eg! , (       d  f       N= f! , (       d  f       N(= f)	zs
Ensure that shebang is quoted on Windows when getting the Python exe
from sys.executable and it contains a space.
#!""
r%   foo-script.pyr&   r'   r(   N)	win32_exer+   r,   r   r-   r.   r/   r0   r1   s         r   "test_sys_executable_escaping_win325TestInstallScripts.test_sys_executable_escaping_win321   s     (,,dnn=]]_%%c&k2c&++o67wOST P  !!! PO _r9   c                 l   SU R                    S3nUR                  5          U R                  [        U5      U R                   5        [	        [        UR                  S5      5      SSS9 nUR                  5       nSSS5        SSS5        WU:X  d   eg! , (       d  f       N= f! , (       d  f       N(= f)zk
Ensure that shebang on Unix is not quoted, even when
a value with spaces
is specified using --executable.
r#   r$   r
   r&   r'   r(   N)unix_spaces_exer,   r   r-   r.   r/   r0   r   r2   r4   r5   r6   s        r   )test_executable_with_spaces_escaping_unix<TestInstallScripts.test_executable_with_spaces_escaping_unix?   s     ,,-R0]]_%%c&k43G3GHc&++e,-sWE F  !!! FE _s$   A	B%*B;B%
B"	B%%
B3c                 x   SU R                    S3nUR                  5          U R                  [        U5      SU R                   -   S-   5        [	        [        UR                  S5      5      SSS9 nUR                  5       nSSS5        SSS5        WU:X  d   eg! , (       d  f       N= f! , (       d  f       N(= f)	z}
Ensure that shebang on Windows is quoted when
getting a path with spaces
from --executable, that is itself properly quoted.
r;   r<   "r=   r&   r'   r(   N)r>   r,   r   r-   r.   r/   r0   rC   s        r   "test_executable_arg_escaping_win325TestInstallScripts.test_executable_arg_escaping_win32M   s     (,]]_%%c&k33G#3MNc&++o67wOST P  !!! PO _s$   AB+0BB+
B(	$B++
B9 )N)__name__
__module____qualname____firstlineno__dictr   r*   rB   r>   r   pytestmarkskipifsysplatformr7   r?   rD   rH   __static_attributes__rJ       r   r   r      s    '-9H
 7H6OLI
 [[/8JK" L" [[/G" H" [[/8JK" L" [[/G" H"rV   r   )
__doc__rS   rP   "setuptools.command.install_scriptsr   setuptools.distr    r   r   rJ   rV   r   <module>r[      s#     
  > ( L" L"rV   