From 0ff627286297a3957143577412884dc50ff8a57a Mon Sep 17 00:00:00 2001 From: yatinkarel Date: Mon, 2 Sep 2024 17:29:55 +0530 Subject: [PATCH] Run chown for egg-info only if the directory exists 9-stream jobs failing since [1] merged as these still use GLOBAL_VENV=False. egg-info directory is not created in project source directory when pyproject.toml is used in the project. pyproject.toml being added across projects[2] to support pip 23.1. [1] https://review.opendev.org/c/openstack/nova/+/899753 [2] https://review.opendev.org/q/topic:%22pip-23.1-support%22 Change-Id: I53954a37461aee5dd7f487d6bd205caef4408392 --- inc/python | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/python b/inc/python index 1fd414773f..2083b74dc1 100644 --- a/inc/python +++ b/inc/python @@ -474,7 +474,10 @@ function setup_package { pip_install $flags "$project_dir$extras" # ensure that further actions can do things like setup.py sdist if [[ "$flags" == "-e" && "$GLOBAL_VENV" == "False" ]]; then - safe_chown -R $STACK_USER $1/*.egg-info + # egg-info is not created when project have pyproject.toml + if [ -d $1/*.egg-info ]; then + safe_chown -R $STACK_USER $1/*.egg-info + fi fi }