r?ӼXdZddlZddlZddlmZddlmZddlmZGddZ dS) zinstall_scripts testsN)install_scripts) Distribution)contextsceZdZedddgidZdZdZdZdd Ze j e j d kd dZe j e j d kd dZe j e j d kd dZe j e j d kd dZd S)TestInstallScriptsfooconsole_scriptsz foo=foo:fooz0.0)name entry_pointsversionz%/usr/dummy-test-path/local/bin/pythonz/usr/bin/env dummy-test-pythonz6C:\Dummy Test Path\Program Files\Python 3.6\python.exeNcLt|j}d|_t|}||_||d}||_|tj 5| ddddS#1swxYwYdS)Nzsetup.py build_scripts) rsettings script_namer install_dirget_finalized_command executableensure_finalizedrquietrun)selfrrdistcmdbss w/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/setuptools/tests/test_install_scripts.py_run_install_scriptsz'TestInstallScripts._run_install_scriptssDM**%d##%  !**?;;B&BM  ^     GGIII                  s7BB Bwin32znon-Windows only)reasoncd|jd}|d|j|5|t |t t |ddd5}|}dddn #1swxYwYdddn #1swxYwY||ksJdS) zt Ensure that shebang is not quoted on Unix when getting the Python exe from sys.executable. #! sys.executabler rutf-8encodingN)unix_exesetattras_cwdrstropenjoinreadlinertmpdir monkeypatchexpectedfactuals r!test_sys_executable_escaping_unixz4TestInstallScripts.test_sys_executable_escaping_unix#sM * ))),dm<<< ]]__ & &  % %c&kk 2 2 2c&++e,,--sWEEE & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &!!!!!!6ACB1% C1B5 5C8B5 9CC C z Windows onlycd|jd}|d|j|5|t |t t |ddd5}|}dddn #1swxYwYdddn #1swxYwY||ksJdS) z 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*rr+r,r-r.r/s r"test_sys_executable_escaping_win32z5TestInstallScripts.test_sys_executable_escaping_win321sN -,,,,dn=== ]]__ & &  % %c&kk 2 2 2c&++o6677wOOO &ST & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &!!!!!!r6cd|jd}|5|t||jt t|ddd5}|}dddn #1swxYwYdddn #1swxYwY||ksJdS)z 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*rr+r,r-r.rr0r2r3r4s r)test_executable_with_spaces_escaping_unixzr;rpytestmarkskipifsysplatformr5r<r@rCrrr sEt '-9H 7H6OLI     [ /8JKK " "LK " [ /GG " "HG " [ /8JKK " "LK " [ /GG " "HG " " "rNr) __doc__rKrH"setuptools.command.install_scriptsrsetuptools.distrrrrMrNrrSs >>>>>>((((((L"L"L"L"L"L"L"L"L"L"rN