Skip to content

Commit 3162c91

Browse files
authored
Simplify output from make pyspec (#3938)
1 parent 72e9a31 commit 3162c91

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ generate_tests: $(GENERATOR_TARGETS)
105105

106106
# "make pyspec" to create the pyspec for all phases.
107107
pyspec:
108-
python3 -m venv venv; . venv/bin/activate; python3 setup.py pyspecdev
108+
@python3 -m venv venv; . venv/bin/activate; python3 setup.py pyspecdev
109109

110110
# check the setup tool requirements
111111
preinstallation:

setup.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@
3535
)
3636
from pysetup.md_doc_paths import get_md_doc_paths
3737

38+
# Ignore '1.5.0-alpha.*' to '1.5.0a*' messages.
39+
import warnings
40+
warnings.filterwarnings('ignore', message='Normalizing .* to .*')
41+
42+
# Ignore 'running' and 'creating' messages
43+
import logging
44+
class PyspecFilter(logging.Filter):
45+
def filter(self, record):
46+
return not record.getMessage().startswith(('running ', 'creating '))
47+
logging.getLogger().addFilter(PyspecFilter())
3848

3949
# NOTE: have to programmatically include third-party dependencies in `setup.py`.
4050
def installPackage(package: str):
@@ -394,8 +404,6 @@ def initialize_options(self):
394404
def finalize_options(self):
395405
"""Post-process options."""
396406
if len(self.md_doc_paths) == 0:
397-
print("no paths were specified, using default markdown file paths for pyspec"
398-
" build (spec fork: %s)" % self.spec_fork)
399407
self.md_doc_paths = get_md_doc_paths(self.spec_fork)
400408
if len(self.md_doc_paths) == 0:
401409
raise Exception('no markdown files specified, and spec fork "%s" is unknown', self.spec_fork)
@@ -428,6 +436,7 @@ def run(self):
428436
if not self.dry_run:
429437
dir_util.mkpath(self.out_dir)
430438

439+
print(f'Building pyspec: {self.spec_fork}')
431440
for (name, preset_paths, config_path) in self.parsed_build_targets:
432441
spec_str = build_spec(
433442
spec_builders[self.spec_fork].fork,
@@ -492,7 +501,6 @@ def run_pyspec_cmd(self, spec_fork: str, **opts):
492501
self.run_command('pyspec')
493502

494503
def run(self):
495-
print("running build_py command")
496504
for spec_fork in spec_builders:
497505
self.run_pyspec_cmd(spec_fork=spec_fork)
498506

0 commit comments

Comments
 (0)