From 6710f84a902cd90e68cb95d56a7603adbea1aad9 Mon Sep 17 00:00:00 2001 From: Roman Kuznecov Date: Thu, 16 Nov 2023 14:36:53 +0000 Subject: [PATCH] tox: Do not concat stdout and stderr in getting siblings Several packages in calling "python setup.py --name ..." may return warning message, e.g.: ... _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !! ******************************************************************************** Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`. ******************************************************************************** !! dist.fetch_build_eggs(dist.setup_requires) WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section' and then this huge log places into the package_name variable. But script expects that package_name will contain only package name. Because of this situation could not find siblings packages and install them. Change-Id: I5bf9a19233c48d1260b5ab17d749bfc58a8ef2fa --- roles/tox/library/tox_install_sibling_packages.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/roles/tox/library/tox_install_sibling_packages.py b/roles/tox/library/tox_install_sibling_packages.py index cbf81818c..b887f4179 100644 --- a/roles/tox/library/tox_install_sibling_packages.py +++ b/roles/tox/library/tox_install_sibling_packages.py @@ -109,8 +109,7 @@ def get_sibling_python_packages(projects, tox_python): # package name is. package_name = subprocess.check_output( [os.path.abspath(tox_python), 'setup.py', '--name'], - cwd=os.path.abspath(root), - stderr=subprocess.STDOUT).decode('utf-8') + cwd=os.path.abspath(root)).decode('utf-8') if package_name: package_name = package_name.strip() packages[package_name] = root