From 63405ffaa3fb164950d79408855485f5c4b3d9f2 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Tue, 2 Jul 2013 14:25:37 -0400 Subject: [PATCH 1/2] Create the doc/mpl_examples symlink if not existing. --- doc/make.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/make.py b/doc/make.py index 4025da223fe1..8c342091a790 100755 --- a/doc/make.py +++ b/doc/make.py @@ -236,6 +236,12 @@ def all(): os.chdir(os.path.dirname(os.path.join(current_dir, __file__))) 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') if len(sys.argv)>1: if '--small' in sys.argv[1:]: From 2c5ef7beabb4894e8c146fe002fc36ff5d47004e Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 17 Jul 2013 13:34:35 -0400 Subject: [PATCH 2/2] Fix other symlinks in the doc directory --- doc/make.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/doc/make.py b/doc/make.py index 8c342091a790..ab48fef18050 100755 --- a/doc/make.py +++ b/doc/make.py @@ -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:]: