Skip to content

Commit

Permalink
Mock xdg module when building man pages
Browse files Browse the repository at this point in the history
That module is not needed functionally when building man pages
but was imported anyway.

Fixes some run dependencies becoming build dependencies.
  • Loading branch information
igo95862 committed Feb 21, 2023
1 parent bfe2730 commit 99b3c72
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/man_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@

from argparse import ArgumentParser
from pathlib import Path
from sys import modules
from textwrap import indent
from typing import TYPE_CHECKING
from unittest.mock import MagicMock

from jinja2 import Environment, FileSystemLoader, StrictUndefined

from bubblejail.bubblejail_cli_metadata import BUBBLEJAIL_CMD
from bubblejail.services import SERVICES_CLASSES

if TYPE_CHECKING:
from collections.abc import Iterator
Expand Down Expand Up @@ -185,6 +186,10 @@ def generate_cmd_man(template_dir: Path) -> None:


def generate_services_man(template_dir: Path) -> None:
modules['xdg'] = MagicMock()

from bubblejail.services import SERVICES_CLASSES

env = Environment(
loader=FileSystemLoader(template_dir),
undefined=StrictUndefined,
Expand Down

0 comments on commit 99b3c72

Please sign in to comment.