def generate_package_index_markdown(self, python_executable_directory: str|None = None, winpyver2: str|None = None,
                                         flavor: str|None = None, architecture_bits: int|None = None
                                         , release_level: str|None = None, wheeldir: str|None = None) -> str:
        """Generates a Markdown formatted package index page."""
        my_ver , my_arch = utils.get_python_infos(python_executable_directory or self.target)
        my_winpyver2 = winpyver2 or os.getenv("WINPYVER2","")
        my_winpyver2 = my_winpyver2 if my_winpyver2 != "" else my_ver
        my_flavor = flavor or os.getenv("WINPYFLAVOR", "")
        my_release_level = release_level or  os.getenv("WINPYVER", "").replace(my_winpyver2+my_flavor, "")

        tools_list = utils.get_installed_tools(utils.get_python_executable(python_executable_directory))
        package_list = [(pkg.name, pkg.url, pkg.version, pkg.description) for pkg in self.get_installed_packages()]
        wheelhouse_list = []
        my_wheeldir = Path(wheeldir) if wheeldir else self.wheelhouse / 'included.wheels'
        if my_wheeldir.is_dir():
            wheelhouse_list = [(name, f"https://pypi.org/project/{name}", version, summary)
               for name, version, summary in wh.list_packages_with_metadata(str(my_wheeldir)) ]

        return f"""## WinPython {my_winpyver2 + my_flavor}

The following packages are included in WinPython-{my_arch}bit v{my_winpyver2 + my_flavor} {my_release_level}.

<details>

{self.render_markdown_for_list("Tools", tools_list)}
{self.render_markdown_for_list("Python packages", package_list)}
{self.render_markdown_for_list("WheelHouse packages", wheelhouse_list)}
</details>
"""
Generates a Markdown formatted package index page.
winpython/wppm.py