a [fY @s ddlZddlmZmZmZdZdeeeeeeedddZeeeeeeeedd d Z eeeeed d d Z eeeeeeeeeeeeedddZ eeeeeedddZ eeeeeeeeeeeeeeeeeeed ddZ dS)N)ListOptionalSequencea'import io, os, sys, setuptools, tokenize; sys.argv[0] = {0!r}; __file__={0!r};f = getattr(tokenize, 'open', open)(__file__) if os.path.exists(__file__) else io.StringIO('from setuptools import setup; setup()');code = f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))F) setup_py_pathglobal_optionsno_user_configunbuffered_outputreturncCsFtjg}|r|dg7}|dt|g7}|r4||7}|rB|dg7}|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_SHIMformat)rrrrargsrH/usr/lib/python3.9/site-packages/pip/_internal/utils/setuptools_build.pymake_setuptools_shim_argss  r)rr build_optionsdestination_dirr cCs(t||dd}|dd|g7}||7}|S)NTrrZ bdist_wheelz-dr)rrrrrrrr make_setuptools_bdist_wheel_args/s r)rrr cCst||dd}|ddg7}|S)NTrZcleanz--allr)rrrrrrmake_setuptools_clean_argsAs  r)rrinstall_optionsrprefixhome use_user_siter cCsf|r |r Jt|||d}|ddg7}||7}|r>|d|g7}|durR|d|g7}|rb|ddg7}|S)N)rrZdevelopz --no-deps--prefixz --install-dir--user --prefix=r)rrrrrrrrrrrmake_setuptools_develop_argsLs     r)r egg_info_dirrr cCs*t||d}|dg7}|r&|d|g7}|S)N)rZegg_infoz --egg-baser)rr rrrrrmake_setuptools_egg_info_argsls    r!) rrrrecord_filenamerootr header_dirrrr pycompiler c Cs|r |r J|r|rJt||| dd} | dd|g7} | dg7} |durT| d|g7} |durh| d|g7} |dur|| d|g7} |r| d d g7} | r| d g7} n | d g7} |r| d |g7} | |7} | S)NT)rrrinstallz--recordz#--single-version-externally-managedz--rootrz--homerrz --compilez --no-compilez--install-headersr) rrrr"r#rr$rrrr%rrrrmake_setuptools_install_args{s2          r')NFF)r typingrrrr strboolrrrrr!r'rrrrsd      !