File: make_docs.py

package info (click to toggle)
simplejson 3.20.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 596 kB
  • sloc: python: 3,413; ansic: 2,950; makefile: 10; sh: 8
file content (17 lines) | stat: -rwxr-xr-x 406 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python
import os
import subprocess

SPHINX_BUILD = 'sphinx-build'

DOCTREES_DIR = 'build/doctrees'
HTML_DIR = 'docs'
for dirname in DOCTREES_DIR, HTML_DIR:
    if not os.path.exists(dirname):
        os.makedirs(dirname)

open(os.path.join(HTML_DIR, '.nojekyll'), 'w').close()
res = subprocess.call([
    SPHINX_BUILD, '-d', DOCTREES_DIR, '-b', 'html', '.', 'docs',
])
raise SystemExit(res)