mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-22 08:29:23 +00:00
Simplify output from make pyspec (#3938)
This commit is contained in:
parent
72e9a319f1
commit
3162c91aff
2
Makefile
2
Makefile
@ -105,7 +105,7 @@ generate_tests: $(GENERATOR_TARGETS)
|
|||||||
|
|
||||||
# "make pyspec" to create the pyspec for all phases.
|
# "make pyspec" to create the pyspec for all phases.
|
||||||
pyspec:
|
pyspec:
|
||||||
python3 -m venv venv; . venv/bin/activate; python3 setup.py pyspecdev
|
@python3 -m venv venv; . venv/bin/activate; python3 setup.py pyspecdev
|
||||||
|
|
||||||
# check the setup tool requirements
|
# check the setup tool requirements
|
||||||
preinstallation:
|
preinstallation:
|
||||||
|
14
setup.py
14
setup.py
@ -35,6 +35,16 @@ from pysetup.helpers import (
|
|||||||
)
|
)
|
||||||
from pysetup.md_doc_paths import get_md_doc_paths
|
from pysetup.md_doc_paths import get_md_doc_paths
|
||||||
|
|
||||||
|
# Ignore '1.5.0-alpha.*' to '1.5.0a*' messages.
|
||||||
|
import warnings
|
||||||
|
warnings.filterwarnings('ignore', message='Normalizing .* to .*')
|
||||||
|
|
||||||
|
# Ignore 'running' and 'creating' messages
|
||||||
|
import logging
|
||||||
|
class PyspecFilter(logging.Filter):
|
||||||
|
def filter(self, record):
|
||||||
|
return not record.getMessage().startswith(('running ', 'creating '))
|
||||||
|
logging.getLogger().addFilter(PyspecFilter())
|
||||||
|
|
||||||
# NOTE: have to programmatically include third-party dependencies in `setup.py`.
|
# NOTE: have to programmatically include third-party dependencies in `setup.py`.
|
||||||
def installPackage(package: str):
|
def installPackage(package: str):
|
||||||
@ -394,8 +404,6 @@ class PySpecCommand(Command):
|
|||||||
def finalize_options(self):
|
def finalize_options(self):
|
||||||
"""Post-process options."""
|
"""Post-process options."""
|
||||||
if len(self.md_doc_paths) == 0:
|
if len(self.md_doc_paths) == 0:
|
||||||
print("no paths were specified, using default markdown file paths for pyspec"
|
|
||||||
" build (spec fork: %s)" % self.spec_fork)
|
|
||||||
self.md_doc_paths = get_md_doc_paths(self.spec_fork)
|
self.md_doc_paths = get_md_doc_paths(self.spec_fork)
|
||||||
if len(self.md_doc_paths) == 0:
|
if len(self.md_doc_paths) == 0:
|
||||||
raise Exception('no markdown files specified, and spec fork "%s" is unknown', self.spec_fork)
|
raise Exception('no markdown files specified, and spec fork "%s" is unknown', self.spec_fork)
|
||||||
@ -428,6 +436,7 @@ class PySpecCommand(Command):
|
|||||||
if not self.dry_run:
|
if not self.dry_run:
|
||||||
dir_util.mkpath(self.out_dir)
|
dir_util.mkpath(self.out_dir)
|
||||||
|
|
||||||
|
print(f'Building pyspec: {self.spec_fork}')
|
||||||
for (name, preset_paths, config_path) in self.parsed_build_targets:
|
for (name, preset_paths, config_path) in self.parsed_build_targets:
|
||||||
spec_str = build_spec(
|
spec_str = build_spec(
|
||||||
spec_builders[self.spec_fork].fork,
|
spec_builders[self.spec_fork].fork,
|
||||||
@ -492,7 +501,6 @@ class PyspecDevCommand(Command):
|
|||||||
self.run_command('pyspec')
|
self.run_command('pyspec')
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
print("running build_py command")
|
|
||||||
for spec_fork in spec_builders:
|
for spec_fork in spec_builders:
|
||||||
self.run_pyspec_cmd(spec_fork=spec_fork)
|
self.run_pyspec_cmd(spec_fork=spec_fork)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user