FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
devloop/devloop/scripts/python at v0.3.1 · compforge/devloop · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
compforge
/
devloop
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
4
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
devloop
/
devloop
/
scripts
/
python
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
38 lines (33 loc) · 1.14 KB
Breadcrumbs
devloop
/
devloop
/
scripts
/
python
Copy path
File metadata and controls
executable file
·
38 lines (33 loc) · 1.14 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!
/bin/sh
#
Resolve one supported Python for every devloop entrypoint. Users commonly have several
#
names on PATH (python, python3, python3.14); the first name is not necessarily the newest.
run_if_supported
() {
py=
$1
shift
command
-v
"
$py
"
>
/dev/null
2>&1
||
return
1
"
$py
"
-c
'
import sys; raise SystemExit(0 if sys.version_info >= (3, 10) else 1)
'
\
>
/dev/null
2>&1
||
return
1
exec
"
$py
"
"
$@
"
}
if
[
-n
"
${DEVLOOP_PYTHON
:-
}
"
]
;
then
run_if_supported
"
$DEVLOOP_PYTHON
"
"
$@
"
echo
"
devloop: DEVLOOP_PYTHON is unavailable or older than Python 3.10:
$DEVLOOP_PYTHON
"
>&2
exit
127
fi
for
py
in
python3 python
;
do
run_if_supported
"
$py
"
"
$@
"
done
#
Some installations expose only a versioned binary. Discover those names from PATH so
#
this keeps working for future Python releases without extending a hard-coded list.
old_ifs=
$IFS
IFS=:
for
dir
in
${PATH
:-
}
;
do
[
-n
"
$dir
"
]
||
dir=.
for
py
in
"
$dir
"
/python3.
*
;
do
[
-x
"
$py
"
]
||
continue
run_if_supported
"
$py
"
"
$@
"
done
done
IFS=
$old_ifs
echo
"
devloop: Python 3.10+ not found (tried python3, python, and python3.* on PATH)
"
>&2
exit
127
Back
|
FazBrowse Home
|
New Git URL