From 477015736a0ae27ef722dd22c1c7ad549b6d6589 Mon Sep 17 00:00:00 2001 From: 403f2e <99516593+403F2E@users.noreply.github.com> Date: Thu, 3 Apr 2025 00:15:57 +0000 Subject: [PATCH 1/2] Fix: replacing the old "easy_install.get_script_args" with the new setuptools version "ScripWriter.get_args". --- ryu/hooks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ryu/hooks.py b/ryu/hooks.py index d7a2a8ddf..397e0ea11 100644 --- a/ryu/hooks.py +++ b/ryu/hooks.py @@ -17,7 +17,7 @@ import os import sys -from setuptools.command import easy_install +from setuptools.command import ScriptWriter from ryu import version @@ -33,7 +33,7 @@ def save_orig(): """Save original easy_install.get_script_args. This is necessary because pbr's setup_hook is sometimes called before ours.""" - _main_module()._orig_get_script_args = easy_install.get_script_args + _main_module()._orig_get_script_args = ScriptWriter.get_args def setup_hook(config): @@ -57,7 +57,7 @@ def my_get_script_args(*args, **kwargs): return _main_module()._orig_get_script_args(*args, **kwargs) packaging.override_get_script_args = my_get_script_args - easy_install.get_script_args = my_get_script_args + ScriptWriter.get_args = my_get_script_args # another hack to allow setup from tarball. orig_get_version = packaging.get_version From 27e7b87839549b9d355e7720a1900d1a968a4a59 Mon Sep 17 00:00:00 2001 From: 403f2e <99516593+403F2E@users.noreply.github.com> Date: Sat, 5 Apr 2025 16:21:35 +0000 Subject: [PATCH 2/2] fix: fixing the import --- ryu/hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/hooks.py b/ryu/hooks.py index 397e0ea11..8a1158941 100644 --- a/ryu/hooks.py +++ b/ryu/hooks.py @@ -17,7 +17,7 @@ import os import sys -from setuptools.command import ScriptWriter +from setuptools.command.easy_install import ScriptWriter from ryu import version