From bb92f7f8876f75f8973ed1b194d1811cb66524f9 Mon Sep 17 00:00:00 2001 From: John Sirois Date: Wed, 31 Jul 2024 14:38:50 -0700 Subject: [PATCH] Support `install_only_stripped` PBS flavor. (#77) Closes #76 --- CHANGES.md | 7 +++++++ lift.toml | 3 ++- science/__init__.py | 2 +- science/providers/python_build_standalone.py | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 91cc7cc..28cfe8f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,12 @@ # Release Notes +## 0.5.0 + +Add support to the PythonBuildStandalone interpreter provider for the new `install_only_stripped` +distribution flavor introduced in the [20240726 PBS release]( +https://github.com/indygreg/python-build-standalone/releases/tag/20240726) and use this flavor to +ship smaller science fat binaries. + ## 0.4.3 Fix science URL fetching code to gracefully ignore a `~/.netrc` that is a directory when configuring diff --git a/lift.toml b/lift.toml index a7d4146..f305bc0 100644 --- a/lift.toml +++ b/lift.toml @@ -7,8 +7,9 @@ description = "Ship your interpreted executables using science." [[lift.interpreters]] id = "cpython" provider = "PythonBuildStandalone" -release = "20240713" +release = "20240726" version = "3.12.4" +flavor = "install_only_stripped" # By default science ships as a "thin" scie that fetches CPython 3.12 on first run. # We use `science lift --invert-lazy cpython ...` when producing "fat" scies. lazy = true diff --git a/science/__init__.py b/science/__init__.py index 77aee1c..5fe230a 100644 --- a/science/__init__.py +++ b/science/__init__.py @@ -3,6 +3,6 @@ from packaging.version import Version -__version__ = "0.4.3" +__version__ = "0.5.0" VERSION = Version(__version__) diff --git a/science/providers/python_build_standalone.py b/science/providers/python_build_standalone.py index 3b3ec43..96bd17e 100644 --- a/science/providers/python_build_standalone.py +++ b/science/providers/python_build_standalone.py @@ -92,7 +92,7 @@ class Config: metadata=metadata( """The flavor of the Python Standalone Builds release to use. - Currently only accepts 'install_only' which is the default. + Currently only accepts 'install_only' and 'install_only_stripped'. """ ), ) @@ -296,7 +296,7 @@ def distribution(self, platform: Platform) -> Distribution | None: ) placeholders = {} match self.flavor: - case "install_only": + case "install_only" | "install_only_stripped": match platform: case Platform.Windows_x86_64: placeholders[Identifier("python")] = "python\\python.exe"