Skip to content

Commit d3832a2

Browse files
committed
Use Python 3.8 for standalone installations instead of 3.10
This sidesteps issues with the relatively-new files() / Traversable API of importlib.resources that is present in 3.9 and 3.10 but not supported by PyOxidizer's OxidizedImporter. It only supports the original importlib.resources API and importlib.resources doesn't implement a backwards compatibility layer/adapter until Python 3.11 (not yet released). By using 3.8, code which tests for the presence of the new API in importlib.resources or tests the Python version will not detect stdlib support for the new API and thus will generally fall back to the API supported by PyOxidizer. Related-to: <certifi/python-certifi#203>
1 parent 2c07a58 commit d3832a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyoxidizer.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def make_exe():
2424
# Obtain the default PythonDistribution for our build target. We link this
2525
# distribution into our produced executable and extract the Python standard
2626
# library from it.
27-
python_dist = default_python_distribution()
27+
python_dist = default_python_distribution(python_version = "3.8")
2828

2929
# This function creates a `PythonPackagingPolicy` instance, which
3030
# influences how executables are built and how resources are added to the

0 commit comments

Comments
 (0)