Skip to content

Commit

Permalink
Use Python 3.8 for standalone installations instead of 3.10
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tsibley committed Sep 22, 2022
1 parent 2216314 commit ff183ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyoxidizer.bzl
Expand Up @@ -24,7 +24,7 @@ def make_exe():
# Obtain the default PythonDistribution for our build target. We link this
# distribution into our produced executable and extract the Python standard
# library from it.
python_dist = default_python_distribution()
python_dist = default_python_distribution(python_version = "3.8")

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

0 comments on commit ff183ea

Please sign in to comment.