/
opt
/
imunify360
/
venv
/
lib
/
python3.11
/
site-packages
/
setuptools
/
_distutils
/
/opt/imunify360/venv/lib/python3.11/site-packages/setuptools/_distutils
mkdir
upload
Name
Size
Mode
Actions
command/
-
0755
rm
__pycache__/
-
0755
rm
archive_util.py
8572
0644
edit
dl
rm
bcppcompiler.py
14722
0644
edit
dl
rm
ccompiler.py
48644
0644
edit
dl
rm
cmd.py
17863
0644
edit
dl
rm
config.py
4911
0644
edit
dl
rm
core.py
9397
0644
edit
dl
rm
cygwinccompiler.py
11924
0644
edit
dl
rm
debug.py
139
0644
edit
dl
rm
dep_util.py
349
0644
edit
dl
rm
dir_util.py
8072
0644
edit
dl
rm
dist.py
50174
0644
edit
dl
rm
errors.py
3589
0644
edit
dl
rm
extension.py
10270
0644
edit
dl
rm
fancy_getopt.py
17899
0644
edit
dl
rm
filelist.py
13715
0644
edit
dl
rm
file_util.py
8213
0644
edit
dl
rm
log.py
1201
0644
edit
dl
rm
msvc9compiler.py
30188
0644
edit
dl
rm
msvccompiler.py
23577
0644
edit
dl
rm
py38compat.py
217
0644
edit
dl
rm
py39compat.py
1964
0644
edit
dl
rm
spawn.py
3495
0644
edit
dl
rm
sysconfig.py
18928
0644
edit
dl
rm
text_file.py
12085
0644
edit
dl
rm
unixccompiler.py
15602
0644
edit
dl
rm
util.py
18100
0644
edit
dl
rm
version.py
12951
0644
edit
dl
rm
versionpredicate.py
5205
0644
edit
dl
rm
_collections.py
5300
0644
edit
dl
rm
_functools.py
1771
0644
edit
dl
rm
_log.py
43
0644
edit
dl
rm
_macos_compat.py
239
0644
edit
dl
rm
_modified.py
2411
0644
edit
dl
rm
_msvccompiler.py
19616
0644
edit
dl
rm
__init__.py
359
0644
edit
dl
rm
Edit:
/opt/imunify360/venv/lib/python3.11/site-packages/setuptools/_distutils/spawn.py
(3495B)
"""distutils.spawn Provides the 'spawn()' function, a front-end to various platform- specific functions for launching another program in a sub-process. Also provides the 'find_executable()' to search the path for a given executable name. """ import sys import os import subprocess from .errors import DistutilsExecError from .debug import DEBUG from ._log import log def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None): # noqa: C901 """Run another program, specified as a command list 'cmd', in a new process. 'cmd' is just the argument list for the new process, ie. cmd[0] is the program to run and cmd[1:] are the rest of its arguments. There is no way to run a program with a name different from that of its executable. If 'search_path' is true (the default), the system's executable search path will be used to find the program; otherwise, cmd[0] must be the exact path to the executable. If 'dry_run' is true, the command will not actually be run. Raise DistutilsExecError if running the program fails in any way; just return on success. """ # cmd is documented as a list, but just in case some code passes a tuple # in, protect our %-formatting code against horrible death cmd = list(cmd) log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = find_executable(cmd[0]) if executable is not None: cmd[0] = executable env = env if env is not None else dict(os.environ) if sys.platform == 'darwin': from distutils.util import MACOSX_VERSION_VAR, get_macosx_target_ver macosx_target_ver = get_macosx_target_ver() if macosx_target_ver: env[MACOSX_VERSION_VAR] = macosx_target_ver try: proc = subprocess.Popen(cmd, env=env) proc.wait() exitcode = proc.returncode except OSError as exc: if not DEBUG: cmd = cmd[0] raise DistutilsExecError( "command {!r} failed: {}".format(cmd, exc.args[-1]) ) from exc if exitcode: if not DEBUG: cmd = cmd[0] raise DistutilsExecError( "command {!r} failed with exit code {}".format(cmd, exitcode) ) def find_executable(executable, path=None): """Tries to find 'executable' in the directories listed in 'path'. A string listing directories separated by 'os.pathsep'; defaults to os.environ['PATH']. Returns the complete filename or None if not found. """ _, ext = os.path.splitext(executable) if (sys.platform == 'win32') and (ext != '.exe'): executable = executable + '.exe' if os.path.isfile(executable): return executable if path is None: path = os.environ.get('PATH', None) if path is None: try: path = os.confstr("CS_PATH") except (AttributeError, ValueError): # os.confstr() or CS_PATH is not available path = os.defpath # bpo-35755: Don't use os.defpath if the PATH environment variable is # set to an empty string # PATH='' doesn't match, whereas PATH=':' looks in the current directory if not path: return None paths = path.split(os.pathsep) for p in paths: f = os.path.join(p, executable) if os.path.isfile(f): # the file exists, we have a shot at spawn working return f return None
Save
cmd:
run