
    dh                        d dl mZ d dlZd dlZd dlmZ  ej                  d      j                         Z	 	 	 d
	 	 	 	 	 	 	 	 	 ddZ		 	 	 	 	 	 	 	 	 	 ddZ
	 	 	 	 	 	 ddZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	 	 	 	 	 	 	 	 dd	Zy)    )annotationsN)Sequencea  
    exec(compile('''
    # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
    #
    # - It imports setuptools before invoking setup.py, to enable projects that directly
    #   import from `distutils.core` to work with newer packaging standards.
    # - It provides a clear error message when setuptools is not installed.
    # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
    #   setuptools doesn't think the script is `-c`. This avoids the following warning:
    #     manifest_maker: standard file '-c' not found".
    # - It generates a shim setup.py, for handling setup.cfg-only projects.
    import os, sys, tokenize, traceback

    try:
        import setuptools
    except ImportError:
        print(
            "ERROR: Can not execute `setup.py` since setuptools failed to import in "
            "the build environment with exception:",
            file=sys.stderr,
        )
        traceback.print_exc()
        sys.exit(1)

    __file__ = %r
    sys.argv[0] = __file__

    if os.path.exists(__file__):
        filename = __file__
        with tokenize.open(__file__) as f:
            setup_py_code = f.read()
    else:
        filename = "<auto-generated setuptools caller>"
        setup_py_code = "from setuptools import setup; setup()"

    exec(compile(setup_py_code, filename, "exec"))
    ''' % ({!r},), "<pip-setuptools-caller>", "exec"))
    c                    t         j                  g}|r|dgz  }|dt        j                  |       gz  }|r||z  }|r|dgz  }|S )ao  
    Get setuptools command arguments with shim wrapped setup file invocation.

    :param setup_py_path: The path to setup.py to be wrapped.
    :param global_options: Additional global options.
    :param no_user_config: If True, disables personal user configuration.
    :param unbuffered_output: If True, adds the unbuffered switch to the
     argument list.
    z-uz-cz--no-user-cfg)sys
executable_SETUPTOOLS_SHIMformat)setup_py_pathglobal_optionsno_user_configunbuffered_outputargss        f/var/www/html/vivango/api/ia/venv/lib/python3.12/site-packages/pip/_internal/utils/setuptools_build.pymake_setuptools_shim_argsr   4   s[     NNDT#**=9::D!!K    c                <    t        | |d      }|dd|gz  }||z  }|S )NTr   r   bdist_wheelz-dr   )r
   r   build_optionsdestination_dirr   s        r    make_setuptools_bdist_wheel_argsr   N   s7     %nD 	]D/22DMDKr   c                0    t        | |d      }|ddgz  }|S )NTr   cleanz--allr   )r
   r   r   s      r   make_setuptools_clean_argsr   `   s+     %nD 	WgDKr   c               r    |r|rJ t        | ||      }|ddgz  }|r|d|gz  }||d|gz  }|r|ddgz  }|S )N)r   r   developz	--no-depsz--prefixz--install-dirz--userz	--prefix=r   )r
   r   r   prefixhomeuse_user_siter   s          r   make_setuptools_develop_argsr!   k   sq     &))$%%D 	Y$$DV$$$'';''Kr   c                >    t        | |      }|dgz  }|r|d|gz  }|S )N)r   egg_infoz
--egg-baser   )r
   egg_info_dirr   r   s       r   make_setuptools_egg_info_argsr%      s3    
 %]>RDZLD|,,Kr   )NFF)
r
   strr   zSequence[str] | Noner   boolr   r'   return	list[str])
r
   r&   r   Sequence[str]r   r*   r   r&   r(   r)   )r
   r&   r   r*   r(   r)   )r
   r&   r   r*   r   r'   r   
str | Noner   r+   r    r'   r(   r)   )r
   r&   r$   r+   r   r'   r(   r)   )
__future__r   r   textwrapcollections.abcr   dedentrstripr   r   r   r   r!   r%    r   r   <module>r2      s9   " 
  $
 #8??%'N 	&(O X ,0 #	(  	
 4! ! 	
 $!  " 	
    <  	r   