File: towncrier-draft-to-file.py

package info (click to toggle)
python-pluggy 1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 464 kB
  • sloc: python: 3,205; sh: 58; makefile: 6
file content (16 lines) | stat: -rw-r--r-- 428 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from subprocess import call
import sys


def main():
    """
    Platform agnostic wrapper script for towncrier.
    Fixes the issue (pytest#7251) where windows users are unable to natively
    run tox -e docs to build pytest docs.
    """
    with open("docs/_changelog_towncrier_draft.rst", "w") as draft_file:
        return call(("towncrier", "--draft"), stdout=draft_file)


if __name__ == "__main__":
    sys.exit(main())