<s> import os <EOL> import subprocess <EOL> import shutil <EOL> SPHINX_BUILD = '<STR_LIT>' <EOL> DOCTREES_DIR = '<STR_LIT>' <EOL> HTML_DIR = '<STR_LIT>' <EOL> for dirname in DOCTREES_DIR , HTML_DIR : <EOL> if not os . path . exists ( dirname ) : <EOL> os . makedirs ( dirname ) <EOL> open ( os . path . join ( HTML_DIR , '<STR_LIT>' ) , '<STR_LIT:w>' ) . close ( ) <EOL> res = subprocess . call ( [ <EOL> SPHINX_BUILD , '<STR_LIT>' , DOCTREES_DIR , '<STR_LIT>' , '<STR_LIT:html>' , '<STR_LIT:.>' , '<STR_LIT>' , <EOL> ] ) <EOL> raise SystemExit ( res ) </s>
