diff options
author | Matthieu Coudron <mcoudron@hotmail.com> | 2022-03-07 12:08:51 +0100 |
---|---|---|
committer | Matthieu Coudron <teto@users.noreply.github.com> | 2022-03-08 10:53:11 +0100 |
commit | 6f3482f640b892e68c16bf8a59bffdbab2f5d4cd (patch) | |
tree | 528c1b6b33a8385654f2be079799795fe73fc040 /maintainers | |
parent | 94fd9265dfa0c3a7c6e5274ca8dd2d7cbc5c3a51 (diff) |
update.py: fix for kakoune/luarocks
Diffstat (limited to 'maintainers')
-rwxr-xr-x | maintainers/scripts/update-luarocks-packages | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/maintainers/scripts/update-luarocks-packages b/maintainers/scripts/update-luarocks-packages index c559d5699dffa..73a233c5f1037 100755 --- a/maintainers/scripts/update-luarocks-packages +++ b/maintainers/scripts/update-luarocks-packages @@ -25,8 +25,8 @@ from pathlib import Path log = logging.getLogger() log.addHandler(logging.StreamHandler()) -ROOT = Path(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))).parent.parent -from pluginupdate import Editor, update_plugins, PluginDesc, CleanEnvironment, LOG_LEVELS, Cache +ROOT = Path(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))).parent.parent # type: ignore +from pluginupdate import Editor, update_plugins, FetchConfig, CleanEnvironment PKG_LIST="maintainers/scripts/luarocks-packages.csv" TMP_FILE="$(mktemp)" @@ -118,7 +118,7 @@ class LuaEditor(Editor): def attr_path(self): return "luaPackages" - def get_update(self, input_file: str, outfile: str, proc: int): + def get_update(self, input_file: str, outfile: str, config: FetchConfig): _prefetch = generate_pkg_nix def update() -> dict: @@ -126,14 +126,14 @@ class LuaEditor(Editor): sorted_plugin_specs = sorted(plugin_specs, key=lambda v: v.name.lower()) try: - pool = Pool(processes=proc) + pool = Pool(processes=config.proc) results = pool.map(_prefetch, sorted_plugin_specs) finally: pass self.generate_nix(results, outfile) - redirects = [] + redirects = {} return redirects return update @@ -181,11 +181,9 @@ def generate_pkg_nix(plug: LuaPlugin): cmd.append(plug.version) - # if plug.server != "src" and plug.server: cmd.append(f"--only-server={plug.server}") - if plug.luaversion: with CleanEnvironment(): local_pkgs = str(ROOT.resolve()) @@ -209,7 +207,6 @@ def main(): parser = editor.create_parser() args = parser.parse_args() - log.setLevel(LOG_LEVELS[args.debug]) update_plugins(editor, args) |