File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Original file line number Diff line number Diff line change @@ -24,11 +24,11 @@ branding:
24
24
runs :
25
25
using : composite
26
26
steps :
27
- # Set up a non-EOL, cibuildwheel & pipx supported Python version
27
+ # Set up the version of Python that supports pyodide
28
28
- uses : actions/setup-python@v5
29
29
id : python
30
30
with :
31
- python-version : " 3.8 - 3. 12"
31
+ python-version : " 3.12"
32
32
update-environment : false
33
33
34
34
- id : cibw
Original file line number Diff line number Diff line change 2
2
3
3
import os
4
4
import shutil
5
+ import sys
5
6
from collections .abc import Sequence , Set
6
7
from dataclasses import dataclass
7
8
from pathlib import Path
@@ -92,7 +93,11 @@ def install_xbuildenv(env: dict[str, str], pyodide_version: str) -> str:
92
93
def get_base_python (identifier : str ) -> Path :
93
94
implementation_id = identifier .split ("-" )[0 ]
94
95
majorminor = implementation_id [len ("cp" ) :]
95
- major_minor = f"{ majorminor [0 ]} .{ majorminor [1 :]} "
96
+ version_info = (int (majorminor [0 ]), int (majorminor [1 :]))
97
+ if version_info == sys .version_info [:2 ]:
98
+ return Path (sys .executable )
99
+
100
+ major_minor = "." .join (str (v ) for v in version_info )
96
101
python_name = f"python{ major_minor } "
97
102
which_python = shutil .which (python_name )
98
103
if which_python is None :
You can’t perform that action at this time.
0 commit comments