<s> """<STR_LIT>""" <EOL> import os <EOL> from pybuilder . core import task , init , depends , dependents , optional , after , use_plugin <EOL> from pybuilder . errors import BuildFailedException <EOL> from pybuilder . utils import assert_can_execute , execute_command <EOL> __author__ = "<STR_LIT>" <EOL> use_plugin ( "<STR_LIT>" ) <EOL> @ init <EOL> def pdoc_init ( project ) : <EOL> project . plugin_depends_on ( "<STR_LIT>" ) <EOL> project . set_property_if_unset ( "<STR_LIT>" , [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> project . set_property_if_unset ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> project . set_property_if_unset ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> project . set_property_if_unset ( "<STR_LIT>" , None ) <EOL> @ after ( "<STR_LIT>" ) <EOL> def pdoc_prepare ( project , logger ) : <EOL> """<STR_LIT>""" <EOL> logger . debug ( "<STR_LIT>" ) <EOL> assert_can_execute ( command_and_arguments = [ "<STR_LIT>" , "<STR_LIT>" ] , <EOL> prerequisite = "<STR_LIT>" , <EOL> caller = "<STR_LIT>" ) <EOL> pdoc_output_dir = project . expand_path ( "<STR_LIT>" ) <EOL> if not os . path . exists ( pdoc_output_dir ) : <EOL> os . mkdir ( pdoc_output_dir ) <EOL> @ task ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> @ depends ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> @ dependents ( optional ( "<STR_LIT>" ) ) <EOL> def pdoc_compile_docs ( project , logger ) : <EOL> logger . info ( "<STR_LIT>" ) <EOL> if not project . get_property ( "<STR_LIT>" ) : <EOL> raise BuildFailedException ( "<STR_LIT>" ) <EOL> pdoc_command_args = project . get_property ( "<STR_LIT>" , [ ] ) <EOL> pdoc_output_dir = project . expand_path ( "<STR_LIT>" ) <EOL> command_and_arguments = [ "<STR_LIT>" ] + pdoc_command_args <EOL> if "<STR_LIT>" in pdoc_command_args : <EOL> command_and_arguments += [ "<STR_LIT>" , pdoc_output_dir ] <EOL> command_and_arguments += [ project . get_property ( "<STR_LIT>" ) ] <EOL> source_directory = project . expand_path ( "<STR_LIT>" ) <EOL> environment = { "<STR_LIT>" : source_directory , <EOL> "<STR_LIT>" : os . environ [ "<STR_LIT>" ] } <EOL> logger . debug ( "<STR_LIT>" , command_and_arguments ) <EOL> execute_command ( command_and_arguments , outfile_name = project . expand_path ( "<STR_LIT>" , "<STR_LIT>" ) , env = environment , <EOL> cwd = pdoc_output_dir ) </s>
