8000 Fix other symlinks in the doc directory · matplotlib/matplotlib@2c5ef7b · GitHub
[go: up one dir, main page]

Skip to content

Commit 2c5ef7b

Browse files
committed
Fix other symlinks in the doc directory
1 parent 63405ff commit 2c5ef7b

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

doc/make.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,18 @@ def all():
237237
copy_if_out_of_date('../INSTALL', 'users/installing.rst')
238238

239239
# Create the examples symlink, if it doesn't exist
240-
if not os.path.exists('mpl_examples'):
241-
if hasattr(os, 'symlink'):
242-
os.symlink('../examples', 'mpl_examples')
243-
else:
244-
shutil.copytree('../examples', 'mpl_examples')
240+
241+
required_symlinks = [
242+
('mpl_examples', '../examples/'),
243+
('mpl_toolkits/axes_grid/examples', '../../../examples/axes_grid/')
244+
]
245+
246+
for link, target in required_symlinks:
247+
if not os.path.exists(link):
248+
if hasattr(os, 'symlink'):
249+
os.symlink(target, link)
250+
else:
251+
shutil.copytree(os.path.join(link, '..', target), link)
245252

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

0 commit comments

Comments
 (0)
0