Skip to content

Commit

Permalink
RtD apidoc
Browse files Browse the repository at this point in the history
  • Loading branch information
txemavs committed Mar 28, 2018
1 parent cb7763c commit ec07c8b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@

def run_apidoc():
cur_dir = os.path.abspath(os.path.dirname(__file__))
package_path = os.path.abspath(os.path.dirname(cur_dir))
output_path = os.path.join(cur_dir, 'api')
cmd_path = 'sphinx-apidoc'
if hasattr(sys, 'real_prefix'):
Expand All @@ -60,6 +61,8 @@ def run_apidoc():
for folder in ['bin', 'Scripts']:
if folder in d:
cmd_path = os.path.abspath(os.path.join(sys.prefix, folder, 'sphinx-apidoc'))
subprocess.check_call([cmd_path, '-e', '-o', output_path, "..", '--force', '--separate'])
print("sphinx apidoc read %s" % (package_path) )
print("sphinx apidoc write %s" % (output_path) )
subprocess.check_call([cmd_path, '--force', '--separate', '-o', output_path, package_path])

run_apidoc()

0 comments on commit ec07c8b

Please sign in to comment.