diff options
Diffstat (limited to 'command.py')
-rw-r--r-- | command.py | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -24,6 +24,10 @@ from error import InvalidProjectGroupsError | |||
24 | import progress | 24 | import progress |
25 | 25 | ||
26 | 26 | ||
27 | # Are we generating man-pages? | ||
28 | GENERATE_MANPAGES = os.environ.get('_REPO_GENERATE_MANPAGES_') == ' indeed! ' | ||
29 | |||
30 | |||
27 | # Number of projects to submit to a single worker process at a time. | 31 | # Number of projects to submit to a single worker process at a time. |
28 | # This number represents a tradeoff between the overhead of IPC and finer | 32 | # This number represents a tradeoff between the overhead of IPC and finer |
29 | # grained opportunity for parallelism. This particular value was chosen by | 33 | # grained opportunity for parallelism. This particular value was chosen by |
@@ -122,10 +126,14 @@ class Command(object): | |||
122 | help='only show errors') | 126 | help='only show errors') |
123 | 127 | ||
124 | if self.PARALLEL_JOBS is not None: | 128 | if self.PARALLEL_JOBS is not None: |
129 | default = 'based on number of CPU cores' | ||
130 | if not GENERATE_MANPAGES: | ||
131 | # Only include active cpu count if we aren't generating man pages. | ||
132 | default = f'%default; {default}' | ||
125 | p.add_option( | 133 | p.add_option( |
126 | '-j', '--jobs', | 134 | '-j', '--jobs', |
127 | type=int, default=self.PARALLEL_JOBS, | 135 | type=int, default=self.PARALLEL_JOBS, |
128 | help='number of jobs to run in parallel (default: %s)' % self.PARALLEL_JOBS) | 136 | help=f'number of jobs to run in parallel (default: {default})') |
129 | 137 | ||
130 | def _Options(self, p): | 138 | def _Options(self, p): |
131 | """Initialize the option parser with subcommand-specific options.""" | 139 | """Initialize the option parser with subcommand-specific options.""" |