|
35 | 35 | ) |
36 | 36 | from pysetup.md_doc_paths import get_md_doc_paths |
37 | 37 |
|
| 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()) |
38 | 48 |
|
39 | 49 | # NOTE: have to programmatically include third-party dependencies in `setup.py`. |
40 | 50 | def installPackage(package: str): |
@@ -173,7 +183,7 @@ def _update_constant_vars_with_kzg_setups(constant_vars, preset_name): |
173 | 183 | constant_vars['KZG_SETUP_G1_MONOMIAL'] = VariableDefinition(constant_vars['KZG_SETUP_G1_MONOMIAL'].value, str(kzg_setups[0]), comment, None) |
174 | 184 | constant_vars['KZG_SETUP_G1_LAGRANGE'] = VariableDefinition(constant_vars['KZG_SETUP_G1_LAGRANGE'].value, str(kzg_setups[1]), comment, None) |
175 | 185 | constant_vars['KZG_SETUP_G2_MONOMIAL'] = VariableDefinition(constant_vars['KZG_SETUP_G2_MONOMIAL'].value, str(kzg_setups[2]), comment, None) |
176 | | - |
| 186 | + |
177 | 187 |
|
178 | 188 | def get_spec(file_name: Path, preset: Dict[str, str], config: Dict[str, str], preset_name=str) -> SpecObject: |
179 | 189 | functions: Dict[str, str] = {} |
@@ -251,10 +261,17 @@ def get_spec(file_name: Path, preset: Dict[str, str], config: Dict[str, str], pr |
251 | 261 | # marko parses `**X**` as a list containing a X |
252 | 262 | description = description[0].children |
253 | 263 |
|
| 264 | + if isinstance(name, list): |
| 265 | + # marko parses `[X]()` as a list containing a X |
| 266 | + name = name[0].children |
254 | 267 | if isinstance(value, list): |
255 | 268 | # marko parses `**X**` as a list containing a X |
256 | 269 | value = value[0].children |
257 | 270 |
|
| 271 | + # Skip types that have been defined elsewhere |
| 272 | + if description is not None and description.startswith("<!-- predefined-type -->"): |
| 273 | + continue |
| 274 | + |
258 | 275 | if not _is_constant_id(name): |
259 | 276 | # Check for short type declarations |
260 | 277 | if value.startswith(("uint", "Bytes", "ByteList", "Union", "Vector", "List", "ByteVector")): |
@@ -394,8 +411,6 @@ def initialize_options(self): |
394 | 411 | def finalize_options(self): |
395 | 412 | """Post-process options.""" |
396 | 413 | 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) |
399 | 414 | self.md_doc_paths = get_md_doc_paths(self.spec_fork) |
400 | 415 | if len(self.md_doc_paths) == 0: |
401 | 416 | raise Exception('no markdown files specified, and spec fork "%s" is unknown', self.spec_fork) |
@@ -428,6 +443,7 @@ def run(self): |
428 | 443 | if not self.dry_run: |
429 | 444 | dir_util.mkpath(self.out_dir) |
430 | 445 |
|
| 446 | + print(f'Building pyspec: {self.spec_fork}') |
431 | 447 | for (name, preset_paths, config_path) in self.parsed_build_targets: |
432 | 448 | spec_str = build_spec( |
433 | 449 | spec_builders[self.spec_fork].fork, |
@@ -492,7 +508,6 @@ def run_pyspec_cmd(self, spec_fork: str, **opts): |
492 | 508 | self.run_command('pyspec') |
493 | 509 |
|
494 | 510 | def run(self): |
495 | | - print("running build_py command") |
496 | 511 | for spec_fork in spec_builders: |
497 | 512 | self.run_pyspec_cmd(spec_fork=spec_fork) |
498 | 513 |
|
@@ -561,7 +576,7 @@ def run(self): |
561 | 576 | RUAMEL_YAML_VERSION, |
562 | 577 | "lru-dict==1.2.0", |
563 | 578 | MARKO_VERSION, |
564 | | - "py_arkworks_bls12381==0.3.4", |
565 | | - "curdleproofs==0.1.1", |
| 579 | + "py_arkworks_bls12381==0.3.8", |
| 580 | + "curdleproofs==0.1.2", |
566 | 581 | ] |
567 | 582 | ) |
0 commit comments