##// END OF EJS Templates
ensure `__name__ == __main__`...
Min RK -
Show More
@@ -30,7 +30,10 b' if ON_RTD:'
30 fname = 'autogen_{}.py'.format(name)
30 fname = 'autogen_{}.py'.format(name)
31 fpath = os.path.abspath(os.path.join('..', fname))
31 fpath = os.path.abspath(os.path.join('..', fname))
32 with open(fpath) as f:
32 with open(fpath) as f:
33 exec(compile(f.read(), fname, 'exec'), {'__file__': fpath})
33 exec(compile(f.read(), fname, 'exec'), {
34 '__file__': fpath,
35 '__name__': '__main__',
36 })
34
37
35 # If your extensions are in another directory, add it here. If the directory
38 # If your extensions are in another directory, add it here. If the directory
36 # is relative to the documentation root, use os.path.abspath to make it
39 # is relative to the documentation root, use os.path.abspath to make it
General Comments 0
You need to be logged in to leave comments. Login now