\bgq 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 v/builddir/build/BUILD/cloudlinux-venv-1.0.7/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|jz}|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. #!%s sys.executabler rutf-8encodingN)unix_exesetattras_cwdrstropenjoinreadlinertmpdir monkeypatchexpectedfactuals r!test_sys_executable_escaping_unixz4TestInstallScripts.test_sys_executable_escaping_unix#sG dm+,dm<<< ]]__ & &  % %c&kk 2 2 2c&++e,,--sWEEE & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &!!!!!!6ACB0$ C0B4 4C7B4 8CC C z Windows onlycd|jz}|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. #!"%s" 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_win321sH .,dn=== ]]__ & &  % %c&kk 2 2 2c&++o6677wOOO &ST & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &!!!!!!r5cd|jz}|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%N)unix_spaces_exer)rr*r+r,r-rr/r1r2r3s r)test_executable_with_spaces_escaping_unixzrArrr sEt '-9H 7H6OLI     [ /8JKK " "LK " [ /GG " "HG " [ /8JKK " "LK " [ /GG " "HG " " "rLr) __doc__rIrF"setuptools.command.install_scriptsrsetuptools.distrrrrKrLrrQs >>>>>>((((((L"L"L"L"L"L"L"L"L"L"rL