Skip to content

Commit a15f889

Browse files
author
Sam Kleinman
committed
DOCS-965 intersphinx fixed
1 parent a6572fc commit a15f889

File tree

3 files changed

+35
-30
lines changed

3 files changed

+35
-30
lines changed

bin/makefile-builder/intersphinx.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/python
2+
3+
import sys
4+
import os
5+
from makefile_builder import MakefileBuilder
6+
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.getcwd())))
7+
8+
from conf import intersphinx_mapping
9+
10+
m = MakefileBuilder()
11+
12+
def intersphinx_builders():
13+
for i in intersphinx_mapping:
14+
output = '$(output)/%s.inv' % i
15+
m.target(output, block=i)
16+
m.job('@$(PYTHONBIN) bin/intersphinx-download.py $@ ' + intersphinx_mapping[i][0] + 'objects.inv', block=i)
17+
m.append_var('intersphinx-libraries', output, block=i)
18+
m.newline(block=i)
19+
20+
m.newline(block='control')
21+
m.target('intersphinx', '$(intersphinx-libraries)', block='control')
22+
m.target('clean-intersphinx', block='control')
23+
m.job('rm -f $(intersphinx-libraries)', block='control')
24+
m.msg('[intersphinx]: all existing intersphinx inv files removed.', block='control')
25+
m.target('.PHONY', 'intersxpinx clean-intersphinx $(intersphinx-libraries)', block='control')
26+
27+
def main():
28+
intersphinx_builders()
29+
m.write(sys.argv[1])
30+
print('[meta-build]: built "' + sys.argv[1] + '" to specify intersphinx downloads.')
31+
32+
if __name__ == '__main__':
33+
main()

bin/makefile.intersphinx

Lines changed: 0 additions & 28 deletions
This file was deleted.

makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ help:
2929
@echo " pdfs generates pdfs."
3030

3131
############# makefile includes #############
32-
include bin/makefile.intersphinx
3332
include bin/makefile.compatibility
3433
include bin/makefile.content
3534
include bin/makefile.push
@@ -41,13 +40,14 @@ include bin/makefile.push
4140
-include $(output)/makefile.texinfo
4241
-include $(output)/makefile.tables
4342
-include $(output)/makefile.links
43+
-include $(output)/makefile.intersphinx
4444
-include $(output)/makefile.sphinx
4545
-include $(output)/makefile.releases
4646
-include $(output)/makefile.errors
4747
-include $(output)/makefile.migrations
4848
-include $(output)/makefile.sphinx-migration
4949

50-
$(output)/makefile.%:bin/makefile-builder/%.py bin/makefile_builder.py bin/builder_data.py
50+
$(output)/makefile.%:bin/makefile-builder/%.py bin/makefile_builder.py bin/builder_data.py conf.py
5151
@mkdir -p $(output)
5252
@$(PYTHONBIN) bin/makefile-builder/$(subst .,,$(suffix $@)).py $@
5353

0 commit comments

Comments
 (0)