FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
mne-python/tools/github_actions_verify_python.sh at main · mne-tools/mne-python · GitHub
mne-tools
mne-python
Repository navigation
Code
Issues
504
(504)
Pull requests
108
(108)
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
mne-python
/
tools
/
github_actions_verify_python.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
56 lines (53 loc) · 1.84 KB
Breadcrumbs
mne-python
/
tools
/
github_actions_verify_python.sh
Copy path
File metadata and controls
executable file
·
56 lines (53 loc) · 1.84 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!
/bin/bash -ef
set
-eo pipefail
WANT_PYTHON_VERSION=
"
$1
"
if
[[
"
$WANT_PYTHON_VERSION
"
==
*
'
t
'
]]
;
then
WANT_FREETHREADED=true
else
WANT_FREETHREADED=false
fi
WANT_PYTHON_VERSION=
$(
echo
"
$WANT_PYTHON_VERSION
"
|
sed
'
s/t$//g
'
)
if
[[
-z
"
$WANT_PYTHON_VERSION
"
]]
;
then
echo
"
::error::Missing required argument: want Python version (e.g., 3.11)
"
exit
1
fi
GOT_PYTHON=
$(
which python
)
GOT_PYTHON_VERSION=
$(
python --version
)
GOT_FREETHREADED=
$(
python -c
"
import sysconfig; print(str(sysconfig.get_config_var('Py_GIL_DISABLED') == 1).lower())
"
)
echo
"
Checking Python found at:
"
echo
"
\$
(which python) ==
${GOT_PYTHON}
"
echo
"
\$
(python --version) ==
${GOT_PYTHON_VERSION}
"
echo
"
Free-threaded ==
${GOT_FREETHREADED}
"
echo
"
for
"
echo
"
\$
MNE_CI_KIND ==
${MNE_CI_KIND}
"
if
[[
"
${MNE_CI_KIND}
"
==
"
conda
"
]]
;
then
WANT=
"
micromamba/envs/mne
"
elif
[[
"
${MNE_CI_KIND}
"
==
"
old
"
]]
;
then
WANT=
"
mne-python/mne-python/.venv/bin
"
elif
[[
"
${MNE_CI_KIND}
"
==
'
pip
'
*
]]
||
[[
"
${MNE_CI_KIND}
"
==
"
minimal
"
]]
;
then
WANT=
"
/hostedtoolcache/
"
elif
[[
"
${MNE_CI_KIND}
"
==
"
pixi
"
]]
;
then
WANT=
"
mne-python/mne-python/tools/ci/macos-intel/.pixi/
"
else
echo
"
::error::Unrecognized MNE_CI_KIND=
${MNE_CI_KIND}
"
exit
1
fi
if
[[
"
${GOT_PYTHON}
"
!=
*
"
${WANT}
"
*
]]
;
then
echo
"
::error::Did not find
\"
${WANT}
\"
in PATH (dumped below)
"
tr
'
:
'
'
\n
'
<<<
"
$PATH
"
exit
1
else
echo
"
☑ Found expected
\"
${WANT}
\"
"
fi
if
[[
"
${GOT_PYTHON_VERSION}
"
!=
*
"
${WANT_PYTHON_VERSION}
"
*
]]
;
then
echo
"
::error::Did not find expected Python version
\"
${WANT_PYTHON_VERSION}
\"
"
exit
1
else
echo
"
☑ Found expected Python version
\"
${WANT_PYTHON_VERSION}
\"
"
fi
if
[[
"
${GOT_FREETHREADED}
"
!=
"
${WANT_FREETHREADED}
"
]]
;
then
echo
"
::error::Expected free-threaded=
${WANT_FREETHREADED}
but got
${GOT_FREETHREADED}
"
exit
1
else
echo
"
☑ Found expected free-threaded=
${WANT_FREETHREADED}
"
fi
Back
|
FazBrowse Home
|
New Git URL