Skip to content

Commit

Permalink
Fix problem with nested packages not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro-psb committed Jun 27, 2024
1 parent 1dc99e7 commit cc848a3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/pulp_docs/mkdocs_macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,19 @@ def prepare_repositories(TMPDIR: Path, repos: Repos, config: Config):
```
"""
# Download/copy source code to tmpdir
repo_sources = TMPDIR / "repo_sources"
repo_docs = TMPDIR / "repo_docs"
api_src_dir = TMPDIR / "api_json"
shutil.rmtree(repo_sources, ignore_errors=True)
shutil.rmtree(repo_docs, ignore_errors=True)

for repo_or_pkg in repos.all:
# assure subpackages are last, because they depend on their repo parent
subpackages = [s for s in repos.all if isinstance(s, SubPackage)]
normal_repos = [s for s in repos.all if not isinstance(s, SubPackage)]
all_repos = normal_repos + subpackages

# Download/copy source code to tmpdir
for repo_or_pkg in all_repos:
start = time.perf_counter()
# handle subpcakges nested under repositories
this_docs_dir = repo_docs / repo_or_pkg.name
Expand Down

0 comments on commit cc848a3

Please sign in to comment.