
    e	                         d Z ddlZddlZddlmZ ddlmZ ddlmZ  G d dej	        ej
        ej                  Zedk    r ej                     dS dS )	z,Tests for distutils.command.install_scripts.    N)install_scripts)Distribution)supportc                       e Zd Zd Zd ZdS )InstallScriptsTestCasec                    t                      }t          j        d          |j        d<   t          j        ddd          |j        d<   t	          |          }|                     |j                   |                     |j                   |                     |j	                   |                     |j
                   |                                 |                     |j                   |                     |j                   |                     |j	        d           |                     |j
        d           d S )Nz/foo/barbuild_scriptsbuildz/splat/funk   r   force
skip_buildinstall)r   r   DummyCommandcommand_objr   assertFalser   r   assertIsNone	build_dirinstall_dirfinalize_options
assertTrueassertEqual)selfdistcmds      6  /home/conda/feedstock_root/build_artifacts/python-split_1708115622739/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.11/distutils/tests/test_install_scripts.pytest_default_settingsz,InstallScriptsTestCase.test_default_settings   s,   ~~$+$8$%& %& %&!&-&:)' ' '#
 d#####(((#-(((#/***	"""'''
333-88888    c                    |                                  g fd} |dd            |dd            |dd           |                                  }t                      }t          j                  |j        d	<   t          j        |d
d
          |j        d<   t          |          }|                                 |                                 t          j	        |          }D ]}| 
                    ||           d S )Nc                                         |            t          t          j                            |           d          }	 |                    |           |                                 d S # |                                 w xY w)Nw)appendopenospathjoinwriteclose)nametextfexpectedsources      r   write_scriptz>InstallScriptsTestCase.test_installation.<locals>.write_script*   sk    OOD!!!RW\\&$//55A									s   A1 1Bz
script1.pyz@#! /usr/bin/env python2.3
# bogus script w/ Python sh-bang
pass
z
script2.pyz8#!/usr/bin/python
# bogus script w/ Python sh-bang
pass
zshell.shz1#!/bin/sh
# bogus shell script w/ sh-bang
exit 0
r	   r   r   r   r   )mkdtempr   r   r   r   r   r   runr%   listdirassertIn)	r   r/   targetr   r   	installedr*   r-   r.   s	          @@r   test_installationz(InstallScriptsTestCase.test_installation&   sS   	 	 	 	 	 	 	\ %- 	/ 	/ 	/ 	\ %- 	/ 	/ 	/ 	Z #- 	/ 	/ 	/ ~~$+$8v$N$N$N!&-&:"' ' '#
 d##			Jv&&	 	+ 	+DMM$	****	+ 	+r   N)__name__
__module____qualname__r   r6    r   r   r   r      s2        9 9 9,$+ $+ $+ $+ $+r   r   __main__)__doc__r%   unittest!distutils.command.install_scriptsr   distutils.corer   distutils.testsr   TempdirManagerLoggingSilencerTestCaser   r7   mainr:   r   r   <module>rE      s    2 2 				  = = = = = = ' ' ' ' ' ' # # # # # #>+ >+ >+ >+ >+W3$4%.>+ >+ >+B zHMOOOOO r   