python: remove /bin/applets from PATH

This commit is contained in:
Leonid Pliushch 2020-07-09 01:29:50 +03:00
parent 7d0fa4f87b
commit 5da4a40cd0
1 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ diff -uNr Python-3.6.2/Lib/posixpath.py Python-3.6.2.mod/Lib/posixpath.py
sep = '/'
pathsep = ':'
-defpath = '/bin:/usr/bin'
+defpath = '@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets'
+defpath = '@TERMUX_PREFIX@/bin'
altsep = None
devnull = '/dev/null'
@ -54,7 +54,7 @@ diff -uNr Python-3.6.2/Lib/uuid.py Python-3.6.2.mod/Lib/uuid.py
executable = shutil.which(command)
if executable is None:
- path = os.pathsep.join(('/sbin', '/usr/sbin'))
+ path = os.pathsep.join(('@TERMUX_PREFIX@/bin', '@TERMUX_PREFIX@/bin/applets'))
+ path = '@TERMUX_PREFIX@/bin'
executable = shutil.which(command, path=path)
if executable is None:
return None