##// END OF EJS Templates
Updated setup.py and do_sphinx.py for new manual distribution
Ville M. Vainio -
Show More
@@ -60,5 +60,5 b" if sys.platform != 'win32':"
60 oscmd('makeindex -s python.ist modipython.idx')
60 oscmd('makeindex -s python.ist modipython.idx')
61 oscmd('pdflatex ipython.tex')
61 oscmd('pdflatex ipython.tex')
62 oscmd('pdflatex ipython.tex')
62 oscmd('pdflatex ipython.tex')
63
63 oscmd('cp ipython.pdf ../html')
64 os.chdir('../..')
64 os.chdir('../..')
@@ -46,43 +46,25 b' from distutils.core import setup'
46
46
47 # update the manuals when building a source dist
47 # update the manuals when building a source dist
48 if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'):
48 if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'):
49 import textwrap
49 from IPython.genutils import target_update
50 from IPython.genutils import target_update
50 # list of things to be updated. Each entry is a triplet of args for
51 # list of things to be updated. Each entry is a triplet of args for
51 # target_update()
52 # target_update()
52 to_update = [('doc/magic.tex',
53
53 ['IPython/Magic.py'],
54 def oscmd(s):
54 "cd doc && ./update_magic.sh" ),
55 cwd = os.getcwd()
55
56 for l in textwrap.dedent(s).splitlines():
56 ('doc/manual.lyx',
57 print ">", l.strip()
57 ['IPython/Release.py','doc/manual_base.lyx'],
58 os.system(l.strip())
58 "cd doc && ./update_version.sh" ),
59
59
60 os.chdir(cwd)
60 ('doc/manual/manual.html',
61
61 ['doc/manual.lyx',
62 oscmd("""\
62 'doc/magic.tex',
63 cd doc
63 'doc/examples/example-gnuplot.py',
64 python do_sphinx.py""")
64 'doc/examples/example-embed.py',
65
65 'doc/examples/example-embed-short.py',
66 oscmd("cd doc && gzip -9c ipython.1 > ipython.1.gz")
66 'IPython/UserConfig/ipythonrc',
67 oscmd("cd doc && gzip -9c pycolor.1 > pycolor.1.gz")
67 ],
68 "cd doc && "
69 "lyxport -tt --leave --pdf "
70 "--html -o '-noinfo -split +1 -local_icons' manual.lyx"),
71
72 ('doc/new_design.pdf',
73 ['doc/new_design.lyx'],
74 "cd doc && lyxport -tt --pdf new_design.lyx"),
75
76 ('doc/ipython.1.gz',
77 ['doc/ipython.1'],
78 "cd doc && gzip -9c ipython.1 > ipython.1.gz"),
79
80 ('doc/pycolor.1.gz',
81 ['doc/pycolor.1'],
82 "cd doc && gzip -9c pycolor.1 > pycolor.1.gz"),
83 ]
84 for target in to_update:
85 target_update(*target)
86
68
87 # Release.py contains version, authors, license, url, keywords, etc.
69 # Release.py contains version, authors, license, url, keywords, etc.
88 execfile(pjoin('IPython','Release.py'))
70 execfile(pjoin('IPython','Release.py'))
@@ -113,9 +95,12 b" exclude = ('.sh','.1.gz')"
113 docfiles = filter(lambda f:file_doesnt_endwith(f,exclude),glob('doc/*'))
95 docfiles = filter(lambda f:file_doesnt_endwith(f,exclude),glob('doc/*'))
114
96
115 examfiles = filter(isfile, glob('doc/examples/*.py'))
97 examfiles = filter(isfile, glob('doc/examples/*.py'))
116 manfiles = filter(isfile, glob('doc/manual/*.html')) + \
98 manfiles = filter(isfile, glob('doc/build/html/*'))
117 filter(isfile, glob('doc/manual/*.css')) + \
99 manstatic = filter(isfile, glob('doc/build/html/_static/*'))
118 filter(isfile, glob('doc/manual/*.png'))
100
101 # filter(isfile, glob('doc/manual/*.css')) + \
102 # filter(isfile, glob('doc/manual/*.png'))
103
119 manpages = filter(isfile, glob('doc/*.1.gz'))
104 manpages = filter(isfile, glob('doc/*.1.gz'))
120 cfgfiles = filter(isfile, glob('IPython/UserConfig/*'))
105 cfgfiles = filter(isfile, glob('IPython/UserConfig/*'))
121 scriptfiles = filter(isfile, ['scripts/ipython','scripts/pycolor',
106 scriptfiles = filter(isfile, ['scripts/ipython','scripts/pycolor',
@@ -135,6 +120,7 b" if 'bdist_wininst' in sys.argv:"
135 datafiles = [('data', docdirbase, docfiles),
120 datafiles = [('data', docdirbase, docfiles),
136 ('data', pjoin(docdirbase, 'examples'),examfiles),
121 ('data', pjoin(docdirbase, 'examples'),examfiles),
137 ('data', pjoin(docdirbase, 'manual'),manfiles),
122 ('data', pjoin(docdirbase, 'manual'),manfiles),
123 ('data', pjoin(docdirbase, 'manual/_static'),manstatic),
138 ('data', manpagebase, manpages),
124 ('data', manpagebase, manpages),
139 ('data',pjoin(docdirbase, 'extensions'),igridhelpfiles),
125 ('data',pjoin(docdirbase, 'extensions'),igridhelpfiles),
140 ]
126 ]
General Comments 0
You need to be logged in to leave comments. Login now