U ʗRe @sddlZddlZddlmZmZmZedZde ee e e ee dddZ e ee ee e ee dd d Z e ee ee d d d Z e ee ee e ee ee e ee dddZe ee e ee dddZe ee ee e ee ee ee ee e e e ee d ddZdS)N)ListOptionalSequenceah exec(compile(''' # This is -- 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 try: import setuptools except ImportError as error: print( "ERROR: Can not execute `setup.py` since setuptools is not available in " "the build environment.", file=sys.stderr, ) 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 = "" setup_py_code = "from setuptools import setup; setup()" exec(compile(setup_py_code, filename, "exec")) ''' % ({!r},), "", "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)rrrrargsr/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/utils/setuptools_build.pymake_setuptools_shim_args1s  r)rr build_optionsdestination_dirr cCs(t||dd}|dd|g7}||7}|S)NTrr bdist_wheelz-dr)rrrrrrrr make_setuptools_bdist_wheel_argsKs r)rrr cCst||dd}|ddg7}|S)NTrcleanz--allr)rrrrrrmake_setuptools_clean_args]s r)rrinstall_optionsrprefixhome use_user_siter cCsf|r |r tt|||d}|ddg7}||7}|r>|d|g7}|dk rR|d|g7}|rb|ddg7}|S)N)rrdevelopz --no-deps--prefixz --install-dir--user --prefix=AssertionErrorr)rrrrrrrrrrrmake_setuptools_develop_argshs     r$)r egg_info_dirrr cCs*t||d}|dg7}|r&|d|g7}|S)N)regg_infoz --egg-baser)rr%rrrrrmake_setuptools_egg_info_argss    r') rrrrecord_filenamerootr header_dirrrr pycompiler c Cs|r |r t|r|rtt||| dd} | dd|g7} | dg7} |dk rT| d|g7} |dk rh| d|g7} |dk r|| 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--homer r!z --compilez --no-compilez--install-headersr") rrrr(r)rr*rrrr+rrrrmake_setuptools_install_argss2          r-)NFF)r textwraptypingrrrdedentrstripr strboolrrrr$r'r-rrrrsh+    !