From 8c942140fb35b4d4c771562025456ec80a2543e6 Mon Sep 17 00:00:00 2001 From: insolor <2442833+insolor@users.noreply.github.com> Date: Fri, 3 May 2024 18:31:05 +0300 Subject: [PATCH] Create package directories with index files --- pypi_index_builder/build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pypi_index_builder/build.py b/pypi_index_builder/build.py index a760532..5e1a195 100644 --- a/pypi_index_builder/build.py +++ b/pypi_index_builder/build.py @@ -26,7 +26,8 @@ def main(): template = env.get_template("package.html") for name, entries in index_data.items(): - with open(settings.output / f"{name}.html", "w") as package_file: + (settings.output / name).mkdir(exist_ok=True) + with open(settings.output / name / "index.html", "w") as package_file: package_file.write(template.render(data=entries))