2023-12-31 21:25:13 +08:00
|
|
|
# mypy: disallow-untyped-defs
|
2020-05-31 23:11:11 +08:00
|
|
|
from subprocess import call
|
2024-02-01 04:12:33 +08:00
|
|
|
import sys
|
2020-05-31 23:11:11 +08:00
|
|
|
|
|
|
|
|
2023-12-31 21:25:13 +08:00
|
|
|
def main() -> int:
|
2020-05-31 23:11:11 +08:00
|
|
|
"""
|
2023-12-31 21:25:13 +08:00
|
|
|
Platform-agnostic wrapper script for towncrier.
|
|
|
|
Fixes the issue (#7251) where Windows users are unable to natively run tox -e docs to build pytest docs.
|
2020-05-31 23:11:11 +08:00
|
|
|
"""
|
2023-06-20 19:55:40 +08:00
|
|
|
with open(
|
|
|
|
"doc/en/_changelog_towncrier_draft.rst", "w", encoding="utf-8"
|
|
|
|
) as draft_file:
|
2020-05-31 23:11:11 +08:00
|
|
|
return call(("towncrier", "--draft"), stdout=draft_file)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
sys.exit(main())
|