Skip to content

Commit

Permalink
Fix other symlinks in the doc directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Jul 17, 2013
1 parent 63405ff commit 2c5ef7b
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions doc/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,18 @@ def all():
copy_if_out_of_date('../INSTALL', 'users/installing.rst')

# Create the examples symlink, if it doesn't exist
if not os.path.exists('mpl_examples'):
if hasattr(os, 'symlink'):
os.symlink('../examples', 'mpl_examples')
else:
shutil.copytree('../examples', 'mpl_examples')

required_symlinks = [
('mpl_examples', '../examples/'),
('mpl_toolkits/axes_grid/examples', '../../../examples/axes_grid/')
]

for link, target in required_symlinks:
if not os.path.exists(link):
if hasattr(os, 'symlink'):
os.symlink(target, link)
else:
shutil.copytree(os.path.join(link, '..', target), link)

if len(sys.argv)>1:
if '--small' in sys.argv[1:]:
Expand Down

0 comments on commit 2c5ef7b

Please sign in to comment.