def run(self):
metadata = self.distribution.metadata
src_dir = (self.distribution.package_dir or {'': ''})['']
src_dir = os.path.join(os.getcwd(), src_dir)
sys.path.append('src')
print('pwd=', os.getcwd(), ' src-dir=', src_dir)
# Run sphinx by calling the main method, '--full' also adds a
# conf.py
sphinx.apidoc.main(
['', '--private', '-H', metadata.name,
'-A', metadata.author,
'-V', metadata.version,
'-R', metadata.version,
'-o', os.path.join('doc', 'source'), src_dir]
)
# build the doc sources
sphinx.main(['', os.path.join('doc', 'source'),
os.path.join('doc', 'build', 'html')])
评论列表
文章目录