Commit Graph

9 Commits

Author SHA1 Message Date
Eli Schwartz 7229443738
docs: only list the latest build of a given stable tag for each wrapdb entry
If we increment the build revision and re-release a wrap, it's a bugfix
of an old version, so we can simply not bother to list it in the table.
Just list the latest and greatest wrap for each tagged release.

The rest are obviously still available if you look up the relevant tag
manually on github, but they aren't very interesting to show here.
2022-06-16 13:18:55 -04:00
Jussi Pakkanen 139020c2fc Fix exponential regex in doc regeneration. 2022-03-09 18:02:04 -05:00
Eli Schwartz a038fa80f5
docs: fix command help regenerator on python 3.10
In https://github.com/python/cpython/pull/23858 the section header for
option flags was changed from "optional arguments" to "options" with the
rationale that they are not (necessarily) at all optional, while GNU
coreutils calls them options.

In fact, POSIX calls them options (-o) and option-arguments (-o val) and
operands ("positional arguments") so it is indeed a mess, but argparse
is not yet perfect.

Still, fix the documentation generator for now so that it is compatible
with python 3.10 as well.

Fixes traceback on building the docs with:

```
[1/4] Generating gen_docs with a custom command
FAILED: gen_docs.stamp
/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py --output-dir /home/eschwartz/git/meson/docs/builddir --dummy-output-file gen_docs.stamp
Traceback (most recent call last):
  File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 160, in <module>
    regenerate_docs(output_dir=args.output_dir,
  File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 146, in regenerate_docs
    generate_hotdoc_includes(root_dir, output_dir)
  File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 113, in generate_hotdoc_includes
    cmd_data = get_commands_data(root_dir)
  File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 106, in get_commands_data
    cmd_data[cmd] = parse_cmd(cmd_output)
  File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 65, in parse_cmd
    assert arguments_start
AssertionError
```
2022-01-25 01:47:39 -05:00
Daniel Mensinger 3e396b3782
fix: Always explicitly set encoding for text files (fixes #8263) 2021-06-29 11:28:08 +02:00
Xavier Claessens 769fd50373 docs: Generate a table of all wrapdb releases
wrapdb CI will trigger Meson's CI to regenerate the list when
releases.json is updated.
2021-06-05 17:01:34 -04:00
Eli Schwartz 4340bf34fa
various python neatness cleanups
All changes were created by running

"pyupgrade --py3-only --keep-percent-format"

and committing the results. I have not touched string formatting for
now.

- use set literals
- simplify .format() parameter naming
- remove __future__
- remove default "r" mode for open()
- use OSError rather than compatibility aliases
- remove stray parentheses in function(generator) scopes
2021-03-04 17:11:26 -05:00
Eli Schwartz c18a9715b8
Hotdoc: use template for Commands.md instead of generating the entire file (#8154)
* doc: fix hotdoc misuse for dynamically generated content

hotdoc has a native include feature for including files inline. Use this
to generate one file for each dynamically generated code block, and
include that file in Commands.md; see:
https://hotdoc.github.io/syntax-extensions.html#smart-file-inclusion-syntax

This permits us to move back to using the in-tree version of the hotdoc
*.md sources, thus fixing the incorrect inclusion of "builddir/" in the
"Edit on github" links which resulted from using copies as the source.

Fixes #8061

* doc: call the dummy file a "stamp" as it is a better known term
2021-01-10 14:48:34 +02:00
Daniel Mensinger 0d57e307b2
typing: fully annotate tools 2020-09-08 20:15:56 +02:00
TheQwertiest b6981bd16e
Made Commands.md dynamically generated (#7346) 2020-06-30 23:56:08 +03:00