Skip to content

Fix: replacing the old "easy_install.get_script_args" with the new setuptools version "ScripWriter.get_args". #204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ryu/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import os
import sys
from setuptools.command import easy_install
from setuptools.command.easy_install import ScriptWriter
from ryu import version


Expand All @@ -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):
Expand All @@ -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
Expand Down