From e7d3dab47e0e12d47a66f00c129dff5560defa73 Mon Sep 17 00:00:00 2001 From: Chris Novakovic Date: Fri, 24 Jul 2026 17:53:34 +0100 Subject: [PATCH] `pip_library`: ensure `pip_flags` is always a string When the `pip_flags` parameter and the `PipFlags` plugin configuration option are both undefined, the output of `pip_library` contains the [none](https://pypi.org/project/none/) module as well as the desired one because `None` is erroneously passed as an argument to pip. Ensure `None` is not passed to pip under these circumstances. Fixes #313. --- build_defs/python.build_defs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_defs/python.build_defs b/build_defs/python.build_defs index 2657f0d..b884bab 100644 --- a/build_defs/python.build_defs +++ b/build_defs/python.build_defs @@ -434,7 +434,7 @@ def pip_library(name:str, version:str, labels:list=[], hashes:list=None, package post_install_commands = post_install_commands or [] use_pypi = CONFIG.PYTHON.USE_PYPI if use_pypi is None else use_pypi index_flag = '' if use_pypi else '--no-index' - pip_flags = pip_flags or CONFIG.PYTHON.PIP_FLAGS + pip_flags = pip_flags or CONFIG.PYTHON.PIP_FLAGS or "" repo_flag = '' repo = repo or CONFIG.PYTHON.DEFAULT_PIP_REPO