This is an automated email from the ASF dual-hosted git repository. fgerlits pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 02873cc04a538167369c12a6a79213fd41bf7ccc Author: Martin Zink <[email protected]> AuthorDate: Mon Oct 6 11:13:29 2025 +0200 MINIFICPP-2647 Fix Dependency installer for older pythons Signed-off-by: Ferenc Gerlits <[email protected]> Closes #2043 --- .../nifi_python_processors/utils/dependency_installer.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/extensions/python/pythonprocessors/nifi_python_processors/utils/dependency_installer.py b/extensions/python/pythonprocessors/nifi_python_processors/utils/dependency_installer.py index 2109539a4..0365f2005 100644 --- a/extensions/python/pythonprocessors/nifi_python_processors/utils/dependency_installer.py +++ b/extensions/python/pythonprocessors/nifi_python_processors/utils/dependency_installer.py @@ -41,6 +41,10 @@ def extract_dependencies(file_path): return visitor.dependencies +def has_progress_bar() -> bool: + return sys.version_info.major > 3 or (sys.version_info.major == 3 and sys.version_info.minor >= 9) + + if __name__ == '__main__': if len(sys.argv) < 2: sys.exit(1) @@ -48,7 +52,10 @@ if __name__ == '__main__': print("Checking dependencies for MiNiFi python processors...") # --no-cache-dir is used to be in line with NiFi's dependency install behavior - command = [sys.executable, "-m", "pip", "install", "--no-cache-dir", "--progress-bar", "off"] + if has_progress_bar(): + command = [sys.executable, "-m", "pip", "install", "--no-cache-dir", "--progress-bar", "off"] + else: + command = [sys.executable, "-m", "pip", "install", "--no-cache-dir"] dependencies_found = False for i in range(1, len(sys.argv)): if "requirements.txt" in sys.argv[i]:
