Commit 261d5723 authored by Jason R. Coombs's avatar Jason R. Coombs

Rename _gen_args to get_args (for consistency).

parent c3beddd0
...@@ -745,7 +745,7 @@ Please make the appropriate changes for your system and try again. ...@@ -745,7 +745,7 @@ Please make the appropriate changes for your system and try again.
def install_wrapper_scripts(self, dist): def install_wrapper_scripts(self, dist):
if not self.exclude_scripts: if not self.exclude_scripts:
for args in ScriptWriter._gen_args(dist): for args in ScriptWriter.get_args(dist):
self.write_script(*args) self.write_script(*args)
def install_script(self, dist, script_name, script_text, dev_path=None): def install_script(self, dist, script_name, script_text, dev_path=None):
...@@ -921,7 +921,7 @@ Please make the appropriate changes for your system and try again. ...@@ -921,7 +921,7 @@ Please make the appropriate changes for your system and try again.
# delete entry-point scripts to avoid duping # delete entry-point scripts to avoid duping
self.delete_blockers( self.delete_blockers(
[os.path.join(script_dir, args[0]) for args in [os.path.join(script_dir, args[0]) for args in
ScriptWriter._gen_args(dist)] ScriptWriter.get_args(dist)]
) )
# Build .egg file from tmpdir # Build .egg file from tmpdir
bdist_egg.make_zipfile( bdist_egg.make_zipfile(
...@@ -1876,10 +1876,10 @@ class ScriptWriter(object): ...@@ -1876,10 +1876,10 @@ class ScriptWriter(object):
@classmethod @classmethod
def get_script_args(cls, dist, executable=sys_executable, wininst=False): def get_script_args(cls, dist, executable=sys_executable, wininst=False):
# for backward compatibility # for backward compatibility
warnings.warn("Use _gen_args", DeprecationWarning) warnings.warn("Use get_args", DeprecationWarning)
writer = cls.get_writer(wininst) writer = cls.get_writer(wininst)
header = cls.get_script_header("", executable, wininst) header = cls.get_script_header("", executable, wininst)
return writer._gen_args(dist, header) return writer.get_args(dist, header)
@classmethod @classmethod
def get_script_header(cls, script_text, executable=sys_executable, wininst=False): def get_script_header(cls, script_text, executable=sys_executable, wininst=False):
...@@ -1889,7 +1889,7 @@ class ScriptWriter(object): ...@@ -1889,7 +1889,7 @@ class ScriptWriter(object):
return cls.get_header(script_text, executable) return cls.get_header(script_text, executable)
@classmethod @classmethod
def _gen_args(cls, dist, header=None): def get_args(cls, dist, header=None):
""" """
Yield write_script() argument tuples for a distribution's entrypoints Yield write_script() argument tuples for a distribution's entrypoints
""" """
......
...@@ -39,7 +39,7 @@ class install_scripts(orig.install_scripts): ...@@ -39,7 +39,7 @@ class install_scripts(orig.install_scripts):
executable = "python.exe" executable = "python.exe"
writer = ScriptWriter.get_writer(force_windows=is_wininst) writer = ScriptWriter.get_writer(force_windows=is_wininst)
header = ScriptWriter.get_header("", nt_quote_arg(executable)) header = ScriptWriter.get_header("", nt_quote_arg(executable))
for args in writer._gen_args(dist, header): for args in writer.get_args(dist, header):
self.write_script(*args) self.write_script(*args)
def write_script(self, script_name, contents, mode="t", *ignored): def write_script(self, script_name, contents, mode="t", *ignored):
......
...@@ -83,7 +83,7 @@ class TestEasyInstallTest: ...@@ -83,7 +83,7 @@ class TestEasyInstallTest:
def test_get_script_args(self): def test_get_script_args(self):
dist = FakeDist() dist = FakeDist()
args = next(ScriptWriter._gen_args(dist)) args = next(ScriptWriter.get_args(dist))
name, script = itertools.islice(args, 2) name, script = itertools.islice(args, 2)
assert script == WANTED assert script == WANTED
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment