mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-09 18:25:47 +00:00
675d404c38
See tests/core/pyspec/README.md for usage description. This commit: - refactors config loading to be part of the pyspec package - updates requirements and main files to use new config loading - cleans up the build script - converts the build script to a distutil command - runs pyspec build as part of build package command - provides pyspecdev command to get editable spec python files
517 B
517 B
Eth2 config util
For configuration, see Configs documentation.
Usage:
configs_path = 'configs/'
...
from eth2spec.config import config_util
from eth2spec.phase0 import spec
from importlib import reload
my_presets = config_util.prepare_config(configs_path, 'mainnet')
# reload spec to make loaded config effective
reload(spec)
WARNING: this overwrites globals, make sure to prevent accidental collisions with other usage of the same imported specs package.