Show More
@@ -22,8 +22,8 b" name = 'ipython'" | |||||
22 | # because bdist_rpm does not accept dashes (an RPM) convention, and |
|
22 | # because bdist_rpm does not accept dashes (an RPM) convention, and | |
23 | # bdist_deb does not accept underscores (a Debian convention). |
|
23 | # bdist_deb does not accept underscores (a Debian convention). | |
24 |
|
24 | |||
25 |
development = |
|
25 | development = False # change this to False to do a release | |
26 |
version_base = '0.9. |
|
26 | version_base = '0.9.beta' | |
27 | branch = 'ipython' |
|
27 | branch = 'ipython' | |
28 | revision = '1016' |
|
28 | revision = '1016' | |
29 |
|
29 |
@@ -14,14 +14,15 b' graft IPython/config' | |||||
14 | graft IPython/testing |
|
14 | graft IPython/testing | |
15 | graft IPython/tools |
|
15 | graft IPython/tools | |
16 |
|
16 | |||
|
17 | recursive-include IPython/Extensions igrid_help* | |||
|
18 | ||||
17 | graft docs |
|
19 | graft docs | |
18 | exclude docs/\#* |
|
20 | exclude docs/\#* | |
19 | exclude docs/man/*.1 |
|
21 | exclude docs/man/*.1 | |
20 |
|
22 | |||
21 | # There seems to be no way of excluding whole subdirectories, other than |
|
23 | # docs subdirs we want to skip | |
22 | # manually excluding all their subdirs. distutils really is horrible... |
|
24 | prune docs/attic | |
23 | exclude docs/attic/* |
|
25 | prune docs/build | |
24 | exclude docs/build/* |
|
|||
25 |
|
26 | |||
26 | global-exclude *~ |
|
27 | global-exclude *~ | |
27 | global-exclude *.flc |
|
28 | global-exclude *.flc |
@@ -21,10 +21,27 b' help:' | |||||
21 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" |
|
21 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" | |
22 | @echo " changes to make an overview over all changed/added/deprecated items" |
|
22 | @echo " changes to make an overview over all changed/added/deprecated items" | |
23 | @echo " linkcheck to check all external links for integrity" |
|
23 | @echo " linkcheck to check all external links for integrity" | |
|
24 | @echo | |||
|
25 | @echo "Compound utility targets:" | |||
|
26 | @echo "pdf latex and then runs the PDF generation" | |||
|
27 | @echo "all html and pdf" | |||
|
28 | @echo "dist all, and then puts the results in dist/" | |||
24 |
|
29 | |||
25 | clean: |
|
30 | clean: | |
26 | -rm -rf build/* |
|
31 | -rm -rf build/* | |
27 |
|
32 | |||
|
33 | pdf: latex | |||
|
34 | cd build/latex && make all-pdf | |||
|
35 | ||||
|
36 | all: html pdf | |||
|
37 | ||||
|
38 | dist: all | |||
|
39 | mkdir -p dist | |||
|
40 | -rm -rf dist/* | |||
|
41 | ln build/latex/IPython.pdf dist/ | |||
|
42 | cp -al build/html dist/ | |||
|
43 | @echo "Build finished. Final docs are in dist/" | |||
|
44 | ||||
28 | html: |
|
45 | html: | |
29 | mkdir -p build/html build/doctrees |
|
46 | mkdir -p build/html build/doctrees | |
30 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html |
|
47 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html |
@@ -44,7 +44,7 b" copyright = '2008, The IPython Development Team'" | |||||
44 | # The short X.Y version. |
|
44 | # The short X.Y version. | |
45 | version = '0.9' |
|
45 | version = '0.9' | |
46 | # The full version, including alpha/beta/rc tags. |
|
46 | # The full version, including alpha/beta/rc tags. | |
47 | release = '0.9' |
|
47 | release = '0.9.beta1' | |
48 |
|
48 | |||
49 | # There are two options for replacing |today|: either, you set today to some |
|
49 | # There are two options for replacing |today|: either, you set today to some | |
50 | # non-false value, then it is used: |
|
50 | # non-false value, then it is used: | |
@@ -135,12 +135,16 b" htmlhelp_basename = 'IPythondoc'" | |||||
135 | latex_paper_size = 'letter' |
|
135 | latex_paper_size = 'letter' | |
136 |
|
136 | |||
137 | # The font size ('10pt', '11pt' or '12pt'). |
|
137 | # The font size ('10pt', '11pt' or '12pt'). | |
138 |
latex_font_size = '1 |
|
138 | latex_font_size = '11pt' | |
139 |
|
139 | |||
140 | # Grouping the document tree into LaTeX files. List of tuples |
|
140 | # Grouping the document tree into LaTeX files. List of tuples | |
141 | # (source start file, target name, title, author, document class [howto/manual]). |
|
141 | # (source start file, target name, title, author, document class [howto/manual]). | |
142 | latex_documents = [ |
|
142 | ||
143 |
('index', 'IPython.tex', 'IPython Documentation', |
|
143 | latex_documents = [ ('index', 'IPython.tex', 'IPython Documentation', | |
|
144 | ur"""Brian Granger and Fernando PΓ©rez\\ | |||
|
145 | With contributions from:\\ | |||
|
146 | Benjamin Ragan-Kelley and Ville Vainio.""", | |||
|
147 | 'manual'), | |||
144 | ] |
|
148 | ] | |
145 |
|
149 | |||
146 | # The name of an image file (relative to this directory) to place at the top of |
|
150 | # The name of an image file (relative to this directory) to place at the top of |
@@ -105,8 +105,12 b" if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'):" | |||||
105 | # ['IPython/Release.py','docs/source/ipython.rst'], |
|
105 | # ['IPython/Release.py','docs/source/ipython.rst'], | |
106 | # "cd docs && python do_sphinx.py") |
|
106 | # "cd docs && python do_sphinx.py") | |
107 | # ) |
|
107 | # ) | |
|
108 | ||||
108 | [ target_update(*t) for t in to_update ] |
|
109 | [ target_update(*t) for t in to_update ] | |
109 |
|
110 | |||
|
111 | # Build the docs | |||
|
112 | os.system('cd docs && make dist') | |||
|
113 | ||||
110 | #--------------------------------------------------------------------------- |
|
114 | #--------------------------------------------------------------------------- | |
111 | # Find all the packages, package data, scripts and data_files |
|
115 | # Find all the packages, package data, scripts and data_files | |
112 | #--------------------------------------------------------------------------- |
|
116 | #--------------------------------------------------------------------------- |
@@ -82,7 +82,8 b' setup_args = dict(' | |||||
82 | # Find packages |
|
82 | # Find packages | |
83 | #--------------------------------------------------------------------------- |
|
83 | #--------------------------------------------------------------------------- | |
84 |
|
84 | |||
85 |
def add_package(packages, |
|
85 | def add_package(packages,pname,config=False,tests=False,scripts=False, | |
|
86 | others=None): | |||
86 | """ |
|
87 | """ | |
87 | Add a package to the list of packages, including certain subpackages. |
|
88 | Add a package to the list of packages, including certain subpackages. | |
88 | """ |
|
89 | """ | |
@@ -140,36 +141,66 b' def find_package_data():' | |||||
140 | # Find data files |
|
141 | # Find data files | |
141 | #--------------------------------------------------------------------------- |
|
142 | #--------------------------------------------------------------------------- | |
142 |
|
143 | |||
|
144 | def make_dir_struct(tag,base,out_base): | |||
|
145 | """Make the directory structure of all files below a starting dir. | |||
|
146 | ||||
|
147 | This is just a convenience routine to help build a nested directory | |||
|
148 | hierarchy because distutils is too stupid to do this by itself. | |||
|
149 | ||||
|
150 | XXX - this needs a proper docstring! | |||
|
151 | """ | |||
|
152 | ||||
|
153 | # we'll use these a lot below | |||
|
154 | lbase = len(base) | |||
|
155 | pathsep = os.path.sep | |||
|
156 | lpathsep = len(pathsep) | |||
|
157 | ||||
|
158 | out = [] | |||
|
159 | for (dirpath,dirnames,filenames) in os.walk(base): | |||
|
160 | # we need to strip out the dirpath from the base to map it to the | |||
|
161 | # output (installation) path. This requires possibly stripping the | |||
|
162 | # path separator, because otherwise pjoin will not work correctly | |||
|
163 | # (pjoin('foo/','/bar') returns '/bar'). | |||
|
164 | ||||
|
165 | dp_eff = dirpath[lbase:] | |||
|
166 | if dp_eff.startswith(pathsep): | |||
|
167 | dp_eff = dp_eff[lpathsep:] | |||
|
168 | # The output path must be anchored at the out_base marker | |||
|
169 | out_path = pjoin(out_base,dp_eff) | |||
|
170 | # Now we can generate the final filenames. Since os.walk only produces | |||
|
171 | # filenames, we must join back with the dirpath to get full valid file | |||
|
172 | # paths: | |||
|
173 | pfiles = [pjoin(dirpath,f) for f in filenames] | |||
|
174 | # Finally, generate the entry we need, which is a triple of (tag,output | |||
|
175 | # path, files) for use as a data_files parameter in install_data. | |||
|
176 | out.append((tag,out_path,pfiles)) | |||
|
177 | ||||
|
178 | return out | |||
|
179 | ||||
|
180 | ||||
143 | def find_data_files(): |
|
181 | def find_data_files(): | |
144 | """ |
|
182 | """ | |
145 | Find IPython's data_files. |
|
183 | Find IPython's data_files. | |
|
184 | ||||
|
185 | Most of these are docs. | |||
146 | """ |
|
186 | """ | |
147 |
|
187 | |||
148 | # I can't find how to make distutils create a nested dir. structure, so |
|
|||
149 | # in the meantime do it manually. Butt ugly. |
|
|||
150 | # Note that http://www.redbrick.dcu.ie/~noel/distutils.html, ex. 2/3, contain |
|
|||
151 | # information on how to do this more cleanly once python 2.4 can be assumed. |
|
|||
152 | # Thanks to Noel for the tip. |
|
|||
153 | docdirbase = 'share/doc/ipython' |
|
188 | docdirbase = 'share/doc/ipython' | |
154 | manpagebase = 'share/man/man1' |
|
189 | manpagebase = 'share/man/man1' | |
155 |
|
190 | |||
156 | # We only need to exclude from this things NOT already excluded in the |
|
191 | # Simple file lists can be made by hand | |
157 | # MANIFEST.in file. |
|
|||
158 | exclude = ('.sh','.1.gz') |
|
|||
159 | # We need to figure out how we want to package all of our rst docs? |
|
|||
160 | # docfiles = filter(lambda f:file_doesnt_endwith(f,exclude),glob('docs/*')) |
|
|||
161 | # XXX - For now all the example files |
|
|||
162 | examfiles = filter(isfile, glob('docs/examples/core/*.py')) |
|
|||
163 | examfiles += filter(isfile, glob('docs/examples/kernel/*.py')) |
|
|||
164 |
|
||||
165 |
manpages |
|
192 | manpages = filter(isfile, glob('docs/man/*.1.gz')) | |
166 | igridhelpfiles = filter(isfile, glob('IPython/Extensions/igrid_help.*')) |
|
193 | igridhelpfiles = filter(isfile, glob('IPython/Extensions/igrid_help.*')) | |
167 |
|
194 | |||
168 | data_files = [#('data', docdirbase, docfiles), |
|
195 | # For nested structures, use the utility above | |
169 | ('data', pjoin(docdirbase, 'examples'),examfiles), |
|
196 | example_files = make_dir_struct('data','docs/examples', | |
170 | ('data', manpagebase, manpages), |
|
197 | pjoin(docdirbase,'examples')) | |
|
198 | manual_files = make_dir_struct('data','docs/dist',pjoin(docdirbase,'manual')) | |||
|
199 | ||||
|
200 | # And assemble the entire output list | |||
|
201 | data_files = [ ('data',manpagebase, manpages), | |||
171 |
('data',pjoin(docdirbase, |
|
202 | ('data',pjoin(docdirbase,'extensions'),igridhelpfiles), | |
172 | ] |
|
203 | ] + manual_files + example_files | |
173 |
|
204 | |||
174 | ## import pprint # dbg |
|
205 | ## import pprint # dbg | |
175 | ## print '*'*80 |
|
206 | ## print '*'*80 | |
@@ -187,14 +218,14 b' def find_scripts():' | |||||
187 | """ |
|
218 | """ | |
188 | Find IPython's scripts. |
|
219 | Find IPython's scripts. | |
189 | """ |
|
220 | """ | |
190 | scripts = [] |
|
221 | scripts = ['IPython/kernel/scripts/ipengine', | |
191 |
|
|
222 | 'IPython/kernel/scripts/ipcontroller', | |
192 |
|
|
223 | 'IPython/kernel/scripts/ipcluster', | |
193 | scripts.append('IPython/kernel/scripts/ipcluster') |
|
224 | 'scripts/ipython', | |
194 | scripts.append('scripts/ipython') |
|
225 | 'scripts/ipythonx', | |
195 | scripts.append('scripts/ipythonx') |
|
226 | 'scripts/pycolor', | |
196 | scripts.append('scripts/pycolor') |
|
227 | 'scripts/irunner', | |
197 | scripts.append('scripts/irunner') |
|
228 | ] | |
198 |
|
229 | |||
199 | # Script to be run by the windows binary installer after the default setup |
|
230 | # Script to be run by the windows binary installer after the default setup | |
200 | # routine, to add shortcuts and similar windows-only things. Windows |
|
231 | # routine, to add shortcuts and similar windows-only things. Windows | |
@@ -209,7 +240,7 b' def find_scripts():' | |||||
209 | return scripts |
|
240 | return scripts | |
210 |
|
241 | |||
211 | #--------------------------------------------------------------------------- |
|
242 | #--------------------------------------------------------------------------- | |
212 | # Find scripts |
|
243 | # Verify all dependencies | |
213 | #--------------------------------------------------------------------------- |
|
244 | #--------------------------------------------------------------------------- | |
214 |
|
245 | |||
215 | def check_for_dependencies(): |
|
246 | def check_for_dependencies(): |
General Comments 0
You need to be logged in to leave comments.
Login now