Show More
@@ -1,99 +1,99 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """Release data for the IPython project. |
|
2 | """Release data for the IPython project. | |
3 |
|
3 | |||
4 | $Id: Release.py 3002 2008-02-01 07:17:00Z fperez $""" |
|
4 | $Id: Release.py 3002 2008-02-01 07:17:00Z fperez $""" | |
5 |
|
5 | |||
6 | #***************************************************************************** |
|
6 | #***************************************************************************** | |
7 | # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu> |
|
7 | # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu> | |
8 | # |
|
8 | # | |
9 | # Copyright (c) 2001 Janko Hauser <jhauser@zscout.de> and Nathaniel Gray |
|
9 | # Copyright (c) 2001 Janko Hauser <jhauser@zscout.de> and Nathaniel Gray | |
10 | # <n8gray@caltech.edu> |
|
10 | # <n8gray@caltech.edu> | |
11 | # |
|
11 | # | |
12 | # Distributed under the terms of the BSD License. The full license is in |
|
12 | # Distributed under the terms of the BSD License. The full license is in | |
13 | # the file COPYING, distributed as part of this software. |
|
13 | # the file COPYING, distributed as part of this software. | |
14 | #***************************************************************************** |
|
14 | #***************************************************************************** | |
15 |
|
15 | |||
16 | # Name of the package for release purposes. This is the name which labels |
|
16 | # Name of the package for release purposes. This is the name which labels | |
17 | # the tarballs and RPMs made by distutils, so it's best to lowercase it. |
|
17 | # the tarballs and RPMs made by distutils, so it's best to lowercase it. | |
18 | name = 'ipython' |
|
18 | name = 'ipython' | |
19 |
|
19 | |||
20 | # For versions with substrings (like 0.6.16.svn), use an extra . to separate |
|
20 | # For versions with substrings (like 0.6.16.svn), use an extra . to separate | |
21 | # the new substring. We have to avoid using either dashes or underscores, |
|
21 | # the new substring. We have to avoid using either dashes or underscores, | |
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 | |||
30 | if development: |
|
30 | if development: | |
31 | if branch == 'ipython': |
|
31 | if branch == 'ipython': | |
32 | version = '%s.bzr.r%s' % (version_base, revision) |
|
32 | version = '%s.bzr.r%s' % (version_base, revision) | |
33 | else: |
|
33 | else: | |
34 | version = '%s.bzr.r%s.%s' % (version_base, revision, branch) |
|
34 | version = '%s.bzr.r%s.%s' % (version_base, revision, branch) | |
35 | else: |
|
35 | else: | |
36 | version = version_base |
|
36 | version = version_base | |
37 |
|
37 | |||
38 |
|
38 | |||
39 | description = "Tools for interactive development in Python." |
|
39 | description = "Tools for interactive development in Python." | |
40 |
|
40 | |||
41 | long_description = \ |
|
41 | long_description = \ | |
42 | """ |
|
42 | """ | |
43 | IPython provides a replacement for the interactive Python interpreter with |
|
43 | IPython provides a replacement for the interactive Python interpreter with | |
44 | extra functionality. |
|
44 | extra functionality. | |
45 |
|
45 | |||
46 | Main features: |
|
46 | Main features: | |
47 |
|
47 | |||
48 | * Comprehensive object introspection. |
|
48 | * Comprehensive object introspection. | |
49 |
|
49 | |||
50 | * Input history, persistent across sessions. |
|
50 | * Input history, persistent across sessions. | |
51 |
|
51 | |||
52 | * Caching of output results during a session with automatically generated |
|
52 | * Caching of output results during a session with automatically generated | |
53 | references. |
|
53 | references. | |
54 |
|
54 | |||
55 | * Readline based name completion. |
|
55 | * Readline based name completion. | |
56 |
|
56 | |||
57 | * Extensible system of 'magic' commands for controlling the environment and |
|
57 | * Extensible system of 'magic' commands for controlling the environment and | |
58 | performing many tasks related either to IPython or the operating system. |
|
58 | performing many tasks related either to IPython or the operating system. | |
59 |
|
59 | |||
60 | * Configuration system with easy switching between different setups (simpler |
|
60 | * Configuration system with easy switching between different setups (simpler | |
61 | than changing $PYTHONSTARTUP environment variables every time). |
|
61 | than changing $PYTHONSTARTUP environment variables every time). | |
62 |
|
62 | |||
63 | * Session logging and reloading. |
|
63 | * Session logging and reloading. | |
64 |
|
64 | |||
65 | * Extensible syntax processing for special purpose situations. |
|
65 | * Extensible syntax processing for special purpose situations. | |
66 |
|
66 | |||
67 | * Access to the system shell with user-extensible alias system. |
|
67 | * Access to the system shell with user-extensible alias system. | |
68 |
|
68 | |||
69 | * Easily embeddable in other Python programs. |
|
69 | * Easily embeddable in other Python programs. | |
70 |
|
70 | |||
71 | * Integrated access to the pdb debugger and the Python profiler. |
|
71 | * Integrated access to the pdb debugger and the Python profiler. | |
72 |
|
72 | |||
73 | The latest development version is always available at the IPython subversion |
|
73 | The latest development version is always available at the IPython subversion | |
74 | repository_. |
|
74 | repository_. | |
75 |
|
75 | |||
76 | .. _repository: http://ipython.scipy.org/svn/ipython/ipython/trunk#egg=ipython-dev |
|
76 | .. _repository: http://ipython.scipy.org/svn/ipython/ipython/trunk#egg=ipython-dev | |
77 | """ |
|
77 | """ | |
78 |
|
78 | |||
79 | license = 'BSD' |
|
79 | license = 'BSD' | |
80 |
|
80 | |||
81 | authors = {'Fernando' : ('Fernando Perez','fperez@colorado.edu'), |
|
81 | authors = {'Fernando' : ('Fernando Perez','fperez@colorado.edu'), | |
82 | 'Janko' : ('Janko Hauser','jhauser@zscout.de'), |
|
82 | 'Janko' : ('Janko Hauser','jhauser@zscout.de'), | |
83 | 'Nathan' : ('Nathaniel Gray','n8gray@caltech.edu'), |
|
83 | 'Nathan' : ('Nathaniel Gray','n8gray@caltech.edu'), | |
84 | 'Ville' : ('Ville Vainio','vivainio@gmail.com'), |
|
84 | 'Ville' : ('Ville Vainio','vivainio@gmail.com'), | |
85 | 'Brian' : ('Brian E Granger', 'ellisonbg@gmail.com'), |
|
85 | 'Brian' : ('Brian E Granger', 'ellisonbg@gmail.com'), | |
86 | 'Min' : ('Min Ragan-Kelley', 'benjaminrk@gmail.com') |
|
86 | 'Min' : ('Min Ragan-Kelley', 'benjaminrk@gmail.com') | |
87 | } |
|
87 | } | |
88 |
|
88 | |||
89 | author = 'The IPython Development Team' |
|
89 | author = 'The IPython Development Team' | |
90 |
|
90 | |||
91 | author_email = 'ipython-dev@scipy.org' |
|
91 | author_email = 'ipython-dev@scipy.org' | |
92 |
|
92 | |||
93 | url = 'http://ipython.scipy.org' |
|
93 | url = 'http://ipython.scipy.org' | |
94 |
|
94 | |||
95 | download_url = 'http://ipython.scipy.org/dist' |
|
95 | download_url = 'http://ipython.scipy.org/dist' | |
96 |
|
96 | |||
97 | platforms = ['Linux','Mac OSX','Windows XP/2000/NT','Windows 95/98/ME'] |
|
97 | platforms = ['Linux','Mac OSX','Windows XP/2000/NT','Windows 95/98/ME'] | |
98 |
|
98 | |||
99 | keywords = ['Interactive','Interpreter','Shell','Parallel','Distributed'] |
|
99 | keywords = ['Interactive','Interpreter','Shell','Parallel','Distributed'] |
@@ -1,31 +1,32 b'' | |||||
1 | include README_Windows.txt |
|
1 | include README_Windows.txt | |
2 | include win32_manual_post_install.py |
|
2 | include win32_manual_post_install.py | |
3 | include ipython.py |
|
3 | include ipython.py | |
4 | include setupbase.py |
|
4 | include setupbase.py | |
5 |
|
5 | |||
6 | graft scripts |
|
6 | graft scripts | |
7 |
|
7 | |||
8 | graft setupext |
|
8 | graft setupext | |
9 |
|
9 | |||
10 | graft IPython/UserConfig |
|
10 | graft IPython/UserConfig | |
11 |
|
11 | |||
12 | graft IPython/kernel |
|
12 | graft IPython/kernel | |
13 | graft IPython/config |
|
13 | 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 | |
28 | global-exclude *.pyc |
|
29 | global-exclude *.pyc | |
29 | global-exclude .dircopy.log |
|
30 | global-exclude .dircopy.log | |
30 | global-exclude .svn |
|
31 | global-exclude .svn | |
31 | global-exclude .bzr |
|
32 | global-exclude .bzr |
@@ -1,70 +1,87 b'' | |||||
1 | # Makefile for Sphinx documentation |
|
1 | # Makefile for Sphinx documentation | |
2 | # |
|
2 | # | |
3 |
|
3 | |||
4 | # You can set these variables from the command line. |
|
4 | # You can set these variables from the command line. | |
5 | SPHINXOPTS = |
|
5 | SPHINXOPTS = | |
6 | SPHINXBUILD = sphinx-build |
|
6 | SPHINXBUILD = sphinx-build | |
7 | PAPER = |
|
7 | PAPER = | |
8 |
|
8 | |||
9 | # Internal variables. |
|
9 | # Internal variables. | |
10 | PAPEROPT_a4 = -D latex_paper_size=a4 |
|
10 | PAPEROPT_a4 = -D latex_paper_size=a4 | |
11 | PAPEROPT_letter = -D latex_paper_size=letter |
|
11 | PAPEROPT_letter = -D latex_paper_size=letter | |
12 | ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source |
|
12 | ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source | |
13 |
|
13 | |||
14 | .PHONY: help clean html web pickle htmlhelp latex changes linkcheck |
|
14 | .PHONY: help clean html web pickle htmlhelp latex changes linkcheck | |
15 |
|
15 | |||
16 | help: |
|
16 | help: | |
17 | @echo "Please use \`make <target>' where <target> is one of" |
|
17 | @echo "Please use \`make <target>' where <target> is one of" | |
18 | @echo " html to make standalone HTML files" |
|
18 | @echo " html to make standalone HTML files" | |
19 | @echo " pickle to make pickle files (usable by e.g. sphinx-web)" |
|
19 | @echo " pickle to make pickle files (usable by e.g. sphinx-web)" | |
20 | @echo " htmlhelp to make HTML files and a HTML help project" |
|
20 | @echo " htmlhelp to make HTML files and a HTML help project" | |
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 | |
31 | @echo |
|
48 | @echo | |
32 | @echo "Build finished. The HTML pages are in build/html." |
|
49 | @echo "Build finished. The HTML pages are in build/html." | |
33 |
|
50 | |||
34 | pickle: |
|
51 | pickle: | |
35 | mkdir -p build/pickle build/doctrees |
|
52 | mkdir -p build/pickle build/doctrees | |
36 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle |
|
53 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle | |
37 | @echo |
|
54 | @echo | |
38 | @echo "Build finished; now you can process the pickle files or run" |
|
55 | @echo "Build finished; now you can process the pickle files or run" | |
39 | @echo " sphinx-web build/pickle" |
|
56 | @echo " sphinx-web build/pickle" | |
40 | @echo "to start the sphinx-web server." |
|
57 | @echo "to start the sphinx-web server." | |
41 |
|
58 | |||
42 | web: pickle |
|
59 | web: pickle | |
43 |
|
60 | |||
44 | htmlhelp: |
|
61 | htmlhelp: | |
45 | mkdir -p build/htmlhelp build/doctrees |
|
62 | mkdir -p build/htmlhelp build/doctrees | |
46 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp |
|
63 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp | |
47 | @echo |
|
64 | @echo | |
48 | @echo "Build finished; now you can run HTML Help Workshop with the" \ |
|
65 | @echo "Build finished; now you can run HTML Help Workshop with the" \ | |
49 | ".hhp project file in build/htmlhelp." |
|
66 | ".hhp project file in build/htmlhelp." | |
50 |
|
67 | |||
51 | latex: |
|
68 | latex: | |
52 | mkdir -p build/latex build/doctrees |
|
69 | mkdir -p build/latex build/doctrees | |
53 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex |
|
70 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex | |
54 | @echo |
|
71 | @echo | |
55 | @echo "Build finished; the LaTeX files are in build/latex." |
|
72 | @echo "Build finished; the LaTeX files are in build/latex." | |
56 | @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ |
|
73 | @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ | |
57 | "run these through (pdf)latex." |
|
74 | "run these through (pdf)latex." | |
58 |
|
75 | |||
59 | changes: |
|
76 | changes: | |
60 | mkdir -p build/changes build/doctrees |
|
77 | mkdir -p build/changes build/doctrees | |
61 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes |
|
78 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes | |
62 | @echo |
|
79 | @echo | |
63 | @echo "The overview file is in build/changes." |
|
80 | @echo "The overview file is in build/changes." | |
64 |
|
81 | |||
65 | linkcheck: |
|
82 | linkcheck: | |
66 | mkdir -p build/linkcheck build/doctrees |
|
83 | mkdir -p build/linkcheck build/doctrees | |
67 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck |
|
84 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck | |
68 | @echo |
|
85 | @echo | |
69 | @echo "Link check complete; look for any errors in the above output " \ |
|
86 | @echo "Link check complete; look for any errors in the above output " \ | |
70 | "or in build/linkcheck/output.txt." |
|
87 | "or in build/linkcheck/output.txt." |
@@ -1,161 +1,165 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | # |
|
2 | # | |
3 | # IPython documentation build configuration file, created by |
|
3 | # IPython documentation build configuration file, created by | |
4 | # sphinx-quickstart on Thu May 8 16:45:02 2008. |
|
4 | # sphinx-quickstart on Thu May 8 16:45:02 2008. | |
5 | # |
|
5 | # | |
6 | # This file is execfile()d with the current directory set to its containing dir. |
|
6 | # This file is execfile()d with the current directory set to its containing dir. | |
7 | # |
|
7 | # | |
8 | # The contents of this file are pickled, so don't put values in the namespace |
|
8 | # The contents of this file are pickled, so don't put values in the namespace | |
9 | # that aren't pickleable (module imports are okay, they're removed automatically). |
|
9 | # that aren't pickleable (module imports are okay, they're removed automatically). | |
10 | # |
|
10 | # | |
11 | # All configuration values have a default value; values that are commented out |
|
11 | # All configuration values have a default value; values that are commented out | |
12 | # serve to show the default value. |
|
12 | # serve to show the default value. | |
13 |
|
13 | |||
14 | import sys, os |
|
14 | import sys, os | |
15 |
|
15 | |||
16 | # If your extensions are in another directory, add it here. If the directory |
|
16 | # If your extensions are in another directory, add it here. If the directory | |
17 | # is relative to the documentation root, use os.path.abspath to make it |
|
17 | # is relative to the documentation root, use os.path.abspath to make it | |
18 | # absolute, like shown here. |
|
18 | # absolute, like shown here. | |
19 | #sys.path.append(os.path.abspath('some/directory')) |
|
19 | #sys.path.append(os.path.abspath('some/directory')) | |
20 |
|
20 | |||
21 | # General configuration |
|
21 | # General configuration | |
22 | # --------------------- |
|
22 | # --------------------- | |
23 |
|
23 | |||
24 | # Add any Sphinx extension module names here, as strings. They can be extensions |
|
24 | # Add any Sphinx extension module names here, as strings. They can be extensions | |
25 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
|
25 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | |
26 | #extensions = [] |
|
26 | #extensions = [] | |
27 |
|
27 | |||
28 | # Add any paths that contain templates here, relative to this directory. |
|
28 | # Add any paths that contain templates here, relative to this directory. | |
29 | templates_path = ['_templates'] |
|
29 | templates_path = ['_templates'] | |
30 |
|
30 | |||
31 | # The suffix of source filenames. |
|
31 | # The suffix of source filenames. | |
32 | source_suffix = '.txt' |
|
32 | source_suffix = '.txt' | |
33 |
|
33 | |||
34 | # The master toctree document. |
|
34 | # The master toctree document. | |
35 | master_doc = 'index' |
|
35 | master_doc = 'index' | |
36 |
|
36 | |||
37 | # General substitutions. |
|
37 | # General substitutions. | |
38 | project = 'IPython' |
|
38 | project = 'IPython' | |
39 | copyright = '2008, The IPython Development Team' |
|
39 | copyright = '2008, The IPython Development Team' | |
40 |
|
40 | |||
41 | # The default replacements for |version| and |release|, also used in various |
|
41 | # The default replacements for |version| and |release|, also used in various | |
42 | # other places throughout the built documents. |
|
42 | # other places throughout the built documents. | |
43 | # |
|
43 | # | |
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: | |
51 | #today = '' |
|
51 | #today = '' | |
52 | # Else, today_fmt is used as the format for a strftime call. |
|
52 | # Else, today_fmt is used as the format for a strftime call. | |
53 | today_fmt = '%B %d, %Y' |
|
53 | today_fmt = '%B %d, %Y' | |
54 |
|
54 | |||
55 | # List of documents that shouldn't be included in the build. |
|
55 | # List of documents that shouldn't be included in the build. | |
56 | #unused_docs = [] |
|
56 | #unused_docs = [] | |
57 |
|
57 | |||
58 | # List of directories, relative to source directories, that shouldn't be searched |
|
58 | # List of directories, relative to source directories, that shouldn't be searched | |
59 | # for source files. |
|
59 | # for source files. | |
60 | #exclude_dirs = [] |
|
60 | #exclude_dirs = [] | |
61 |
|
61 | |||
62 | # If true, '()' will be appended to :func: etc. cross-reference text. |
|
62 | # If true, '()' will be appended to :func: etc. cross-reference text. | |
63 | #add_function_parentheses = True |
|
63 | #add_function_parentheses = True | |
64 |
|
64 | |||
65 | # If true, the current module name will be prepended to all description |
|
65 | # If true, the current module name will be prepended to all description | |
66 | # unit titles (such as .. function::). |
|
66 | # unit titles (such as .. function::). | |
67 | #add_module_names = True |
|
67 | #add_module_names = True | |
68 |
|
68 | |||
69 | # If true, sectionauthor and moduleauthor directives will be shown in the |
|
69 | # If true, sectionauthor and moduleauthor directives will be shown in the | |
70 | # output. They are ignored by default. |
|
70 | # output. They are ignored by default. | |
71 | #show_authors = False |
|
71 | #show_authors = False | |
72 |
|
72 | |||
73 | # The name of the Pygments (syntax highlighting) style to use. |
|
73 | # The name of the Pygments (syntax highlighting) style to use. | |
74 | pygments_style = 'sphinx' |
|
74 | pygments_style = 'sphinx' | |
75 |
|
75 | |||
76 |
|
76 | |||
77 | # Options for HTML output |
|
77 | # Options for HTML output | |
78 | # ----------------------- |
|
78 | # ----------------------- | |
79 |
|
79 | |||
80 | # The style sheet to use for HTML and HTML Help pages. A file of that name |
|
80 | # The style sheet to use for HTML and HTML Help pages. A file of that name | |
81 | # must exist either in Sphinx' static/ path, or in one of the custom paths |
|
81 | # must exist either in Sphinx' static/ path, or in one of the custom paths | |
82 | # given in html_static_path. |
|
82 | # given in html_static_path. | |
83 | html_style = 'default.css' |
|
83 | html_style = 'default.css' | |
84 |
|
84 | |||
85 | # The name for this set of Sphinx documents. If None, it defaults to |
|
85 | # The name for this set of Sphinx documents. If None, it defaults to | |
86 | # "<project> v<release> documentation". |
|
86 | # "<project> v<release> documentation". | |
87 | #html_title = None |
|
87 | #html_title = None | |
88 |
|
88 | |||
89 | # The name of an image file (within the static path) to place at the top of |
|
89 | # The name of an image file (within the static path) to place at the top of | |
90 | # the sidebar. |
|
90 | # the sidebar. | |
91 | #html_logo = None |
|
91 | #html_logo = None | |
92 |
|
92 | |||
93 | # Add any paths that contain custom static files (such as style sheets) here, |
|
93 | # Add any paths that contain custom static files (such as style sheets) here, | |
94 | # relative to this directory. They are copied after the builtin static files, |
|
94 | # relative to this directory. They are copied after the builtin static files, | |
95 | # so a file named "default.css" will overwrite the builtin "default.css". |
|
95 | # so a file named "default.css" will overwrite the builtin "default.css". | |
96 | html_static_path = ['_static'] |
|
96 | html_static_path = ['_static'] | |
97 |
|
97 | |||
98 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
|
98 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, | |
99 | # using the given strftime format. |
|
99 | # using the given strftime format. | |
100 | html_last_updated_fmt = '%b %d, %Y' |
|
100 | html_last_updated_fmt = '%b %d, %Y' | |
101 |
|
101 | |||
102 | # If true, SmartyPants will be used to convert quotes and dashes to |
|
102 | # If true, SmartyPants will be used to convert quotes and dashes to | |
103 | # typographically correct entities. |
|
103 | # typographically correct entities. | |
104 | #html_use_smartypants = True |
|
104 | #html_use_smartypants = True | |
105 |
|
105 | |||
106 | # Custom sidebar templates, maps document names to template names. |
|
106 | # Custom sidebar templates, maps document names to template names. | |
107 | #html_sidebars = {} |
|
107 | #html_sidebars = {} | |
108 |
|
108 | |||
109 | # Additional templates that should be rendered to pages, maps page names to |
|
109 | # Additional templates that should be rendered to pages, maps page names to | |
110 | # template names. |
|
110 | # template names. | |
111 | #html_additional_pages = {} |
|
111 | #html_additional_pages = {} | |
112 |
|
112 | |||
113 | # If false, no module index is generated. |
|
113 | # If false, no module index is generated. | |
114 | #html_use_modindex = True |
|
114 | #html_use_modindex = True | |
115 |
|
115 | |||
116 | # If true, the reST sources are included in the HTML build as _sources/<name>. |
|
116 | # If true, the reST sources are included in the HTML build as _sources/<name>. | |
117 | #html_copy_source = True |
|
117 | #html_copy_source = True | |
118 |
|
118 | |||
119 | # If true, an OpenSearch description file will be output, and all pages will |
|
119 | # If true, an OpenSearch description file will be output, and all pages will | |
120 | # contain a <link> tag referring to it. The value of this option must be the |
|
120 | # contain a <link> tag referring to it. The value of this option must be the | |
121 | # base URL from which the finished HTML is served. |
|
121 | # base URL from which the finished HTML is served. | |
122 | #html_use_opensearch = '' |
|
122 | #html_use_opensearch = '' | |
123 |
|
123 | |||
124 | # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). |
|
124 | # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). | |
125 | #html_file_suffix = '' |
|
125 | #html_file_suffix = '' | |
126 |
|
126 | |||
127 | # Output file base name for HTML help builder. |
|
127 | # Output file base name for HTML help builder. | |
128 | htmlhelp_basename = 'IPythondoc' |
|
128 | htmlhelp_basename = 'IPythondoc' | |
129 |
|
129 | |||
130 |
|
130 | |||
131 | # Options for LaTeX output |
|
131 | # Options for LaTeX output | |
132 | # ------------------------ |
|
132 | # ------------------------ | |
133 |
|
133 | |||
134 | # The paper size ('letter' or 'a4'). |
|
134 | # The paper size ('letter' or 'a4'). | |
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 | |
147 | # the title page. |
|
151 | # the title page. | |
148 | #latex_logo = None |
|
152 | #latex_logo = None | |
149 |
|
153 | |||
150 | # For "manual" documents, if this is true, then toplevel headings are parts, |
|
154 | # For "manual" documents, if this is true, then toplevel headings are parts, | |
151 | # not chapters. |
|
155 | # not chapters. | |
152 | #latex_use_parts = False |
|
156 | #latex_use_parts = False | |
153 |
|
157 | |||
154 | # Additional stuff for the LaTeX preamble. |
|
158 | # Additional stuff for the LaTeX preamble. | |
155 | #latex_preamble = '' |
|
159 | #latex_preamble = '' | |
156 |
|
160 | |||
157 | # Documents to append as an appendix to all manuals. |
|
161 | # Documents to append as an appendix to all manuals. | |
158 | #latex_appendices = [] |
|
162 | #latex_appendices = [] | |
159 |
|
163 | |||
160 | # If false, no module index is generated. |
|
164 | # If false, no module index is generated. | |
161 | #latex_use_modindex = True |
|
165 | #latex_use_modindex = True |
@@ -1,175 +1,179 b'' | |||||
1 | #!/usr/bin/env python |
|
1 | #!/usr/bin/env python | |
2 | # -*- coding: utf-8 -*- |
|
2 | # -*- coding: utf-8 -*- | |
3 | """Setup script for IPython. |
|
3 | """Setup script for IPython. | |
4 |
|
4 | |||
5 | Under Posix environments it works like a typical setup.py script. |
|
5 | Under Posix environments it works like a typical setup.py script. | |
6 | Under Windows, the command sdist is not supported, since IPython |
|
6 | Under Windows, the command sdist is not supported, since IPython | |
7 | requires utilities which are not available under Windows.""" |
|
7 | requires utilities which are not available under Windows.""" | |
8 |
|
8 | |||
9 | #------------------------------------------------------------------------------- |
|
9 | #------------------------------------------------------------------------------- | |
10 | # Copyright (C) 2008 The IPython Development Team |
|
10 | # Copyright (C) 2008 The IPython Development Team | |
11 | # |
|
11 | # | |
12 | # Distributed under the terms of the BSD License. The full license is in |
|
12 | # Distributed under the terms of the BSD License. The full license is in | |
13 | # the file COPYING, distributed as part of this software. |
|
13 | # the file COPYING, distributed as part of this software. | |
14 | #------------------------------------------------------------------------------- |
|
14 | #------------------------------------------------------------------------------- | |
15 |
|
15 | |||
16 | #------------------------------------------------------------------------------- |
|
16 | #------------------------------------------------------------------------------- | |
17 | # Imports |
|
17 | # Imports | |
18 | #------------------------------------------------------------------------------- |
|
18 | #------------------------------------------------------------------------------- | |
19 |
|
19 | |||
20 | # Stdlib imports |
|
20 | # Stdlib imports | |
21 | import os |
|
21 | import os | |
22 | import sys |
|
22 | import sys | |
23 |
|
23 | |||
24 | from glob import glob |
|
24 | from glob import glob | |
25 |
|
25 | |||
26 | # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly |
|
26 | # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly | |
27 | # update it when the contents of directories change. |
|
27 | # update it when the contents of directories change. | |
28 | if os.path.exists('MANIFEST'): os.remove('MANIFEST') |
|
28 | if os.path.exists('MANIFEST'): os.remove('MANIFEST') | |
29 |
|
29 | |||
30 | from distutils.core import setup |
|
30 | from distutils.core import setup | |
31 |
|
31 | |||
32 | # Local imports |
|
32 | # Local imports | |
33 | from IPython.genutils import target_update |
|
33 | from IPython.genutils import target_update | |
34 |
|
34 | |||
35 | from setupbase import ( |
|
35 | from setupbase import ( | |
36 | setup_args, |
|
36 | setup_args, | |
37 | find_packages, |
|
37 | find_packages, | |
38 | find_package_data, |
|
38 | find_package_data, | |
39 | find_scripts, |
|
39 | find_scripts, | |
40 | find_data_files, |
|
40 | find_data_files, | |
41 | check_for_dependencies |
|
41 | check_for_dependencies | |
42 | ) |
|
42 | ) | |
43 |
|
43 | |||
44 | isfile = os.path.isfile |
|
44 | isfile = os.path.isfile | |
45 |
|
45 | |||
46 | #------------------------------------------------------------------------------- |
|
46 | #------------------------------------------------------------------------------- | |
47 | # Handle OS specific things |
|
47 | # Handle OS specific things | |
48 | #------------------------------------------------------------------------------- |
|
48 | #------------------------------------------------------------------------------- | |
49 |
|
49 | |||
50 | if os.name == 'posix': |
|
50 | if os.name == 'posix': | |
51 | os_name = 'posix' |
|
51 | os_name = 'posix' | |
52 | elif os.name in ['nt','dos']: |
|
52 | elif os.name in ['nt','dos']: | |
53 | os_name = 'windows' |
|
53 | os_name = 'windows' | |
54 | else: |
|
54 | else: | |
55 | print 'Unsupported operating system:',os.name |
|
55 | print 'Unsupported operating system:',os.name | |
56 | sys.exit(1) |
|
56 | sys.exit(1) | |
57 |
|
57 | |||
58 | # Under Windows, 'sdist' has not been supported. Now that the docs build with |
|
58 | # Under Windows, 'sdist' has not been supported. Now that the docs build with | |
59 | # Sphinx it might work, but let's not turn it on until someone confirms that it |
|
59 | # Sphinx it might work, but let's not turn it on until someone confirms that it | |
60 | # actually works. |
|
60 | # actually works. | |
61 | if os_name == 'windows' and 'sdist' in sys.argv: |
|
61 | if os_name == 'windows' and 'sdist' in sys.argv: | |
62 | print 'The sdist command is not available under Windows. Exiting.' |
|
62 | print 'The sdist command is not available under Windows. Exiting.' | |
63 | sys.exit(1) |
|
63 | sys.exit(1) | |
64 |
|
64 | |||
65 | #------------------------------------------------------------------------------- |
|
65 | #------------------------------------------------------------------------------- | |
66 | # Things related to the IPython documentation |
|
66 | # Things related to the IPython documentation | |
67 | #------------------------------------------------------------------------------- |
|
67 | #------------------------------------------------------------------------------- | |
68 |
|
68 | |||
69 | # update the manuals when building a source dist |
|
69 | # update the manuals when building a source dist | |
70 | if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'): |
|
70 | if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'): | |
71 | import textwrap |
|
71 | import textwrap | |
72 |
|
72 | |||
73 | # List of things to be updated. Each entry is a triplet of args for |
|
73 | # List of things to be updated. Each entry is a triplet of args for | |
74 | # target_update() |
|
74 | # target_update() | |
75 | to_update = [ |
|
75 | to_update = [ | |
76 | # FIXME - Disabled for now: we need to redo an automatic way |
|
76 | # FIXME - Disabled for now: we need to redo an automatic way | |
77 | # of generating the magic info inside the rst. |
|
77 | # of generating the magic info inside the rst. | |
78 | #('docs/magic.tex', |
|
78 | #('docs/magic.tex', | |
79 | #['IPython/Magic.py'], |
|
79 | #['IPython/Magic.py'], | |
80 | #"cd doc && ./update_magic.sh" ), |
|
80 | #"cd doc && ./update_magic.sh" ), | |
81 |
|
81 | |||
82 | ('docs/man/ipython.1.gz', |
|
82 | ('docs/man/ipython.1.gz', | |
83 | ['docs/man/ipython.1'], |
|
83 | ['docs/man/ipython.1'], | |
84 | "cd docs/man && gzip -9c ipython.1 > ipython.1.gz"), |
|
84 | "cd docs/man && gzip -9c ipython.1 > ipython.1.gz"), | |
85 |
|
85 | |||
86 | ('docs/man/pycolor.1.gz', |
|
86 | ('docs/man/pycolor.1.gz', | |
87 | ['docs/man/pycolor.1'], |
|
87 | ['docs/man/pycolor.1'], | |
88 | "cd docs/man && gzip -9c pycolor.1 > pycolor.1.gz"), |
|
88 | "cd docs/man && gzip -9c pycolor.1 > pycolor.1.gz"), | |
89 | ] |
|
89 | ] | |
90 |
|
90 | |||
91 | # Only build the docs is sphinx is present |
|
91 | # Only build the docs is sphinx is present | |
92 | try: |
|
92 | try: | |
93 | import sphinx |
|
93 | import sphinx | |
94 | except ImportError: |
|
94 | except ImportError: | |
95 | pass |
|
95 | pass | |
96 | else: |
|
96 | else: | |
97 | pass |
|
97 | pass | |
98 | # BEG: This is disabled as I am not sure what to depend on. |
|
98 | # BEG: This is disabled as I am not sure what to depend on. | |
99 | # I actually don't think we should be automatically building |
|
99 | # I actually don't think we should be automatically building | |
100 | # the docs for people. |
|
100 | # the docs for people. | |
101 | # The do_sphinx scripts builds html and pdf, so just one |
|
101 | # The do_sphinx scripts builds html and pdf, so just one | |
102 | # target is enough to cover all manual generation |
|
102 | # target is enough to cover all manual generation | |
103 | # to_update.append( |
|
103 | # to_update.append( | |
104 | # ('docs/manual/ipython.pdf', |
|
104 | # ('docs/manual/ipython.pdf', | |
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 | #--------------------------------------------------------------------------- | |
113 |
|
117 | |||
114 | packages = find_packages() |
|
118 | packages = find_packages() | |
115 | package_data = find_package_data() |
|
119 | package_data = find_package_data() | |
116 | scripts = find_scripts() |
|
120 | scripts = find_scripts() | |
117 | data_files = find_data_files() |
|
121 | data_files = find_data_files() | |
118 |
|
122 | |||
119 | #--------------------------------------------------------------------------- |
|
123 | #--------------------------------------------------------------------------- | |
120 | # Handle dependencies and setuptools specific things |
|
124 | # Handle dependencies and setuptools specific things | |
121 | #--------------------------------------------------------------------------- |
|
125 | #--------------------------------------------------------------------------- | |
122 |
|
126 | |||
123 | # This dict is used for passing extra arguments that are setuptools |
|
127 | # This dict is used for passing extra arguments that are setuptools | |
124 | # specific to setup |
|
128 | # specific to setup | |
125 | setuptools_extra_args = {} |
|
129 | setuptools_extra_args = {} | |
126 |
|
130 | |||
127 | if 'setuptools' in sys.modules: |
|
131 | if 'setuptools' in sys.modules: | |
128 | setuptools_extra_args['zip_safe'] = False |
|
132 | setuptools_extra_args['zip_safe'] = False | |
129 | setuptools_extra_args['entry_points'] = { |
|
133 | setuptools_extra_args['entry_points'] = { | |
130 | 'console_scripts': [ |
|
134 | 'console_scripts': [ | |
131 | 'ipython = IPython.ipapi:launch_new_instance', |
|
135 | 'ipython = IPython.ipapi:launch_new_instance', | |
132 | 'pycolor = IPython.PyColorize:main', |
|
136 | 'pycolor = IPython.PyColorize:main', | |
133 | 'ipcontroller = IPython.kernel.scripts.ipcontroller:main', |
|
137 | 'ipcontroller = IPython.kernel.scripts.ipcontroller:main', | |
134 | 'ipengine = IPython.kernel.scripts.ipengine:main', |
|
138 | 'ipengine = IPython.kernel.scripts.ipengine:main', | |
135 | 'ipcluster = IPython.kernel.scripts.ipcluster:main', |
|
139 | 'ipcluster = IPython.kernel.scripts.ipcluster:main', | |
136 | 'ipythonx = IPython.frontend.wx.ipythonx:main' |
|
140 | 'ipythonx = IPython.frontend.wx.ipythonx:main' | |
137 | ] |
|
141 | ] | |
138 | } |
|
142 | } | |
139 | setup_args["extras_require"] = dict( |
|
143 | setup_args["extras_require"] = dict( | |
140 | kernel = [ |
|
144 | kernel = [ | |
141 | "zope.interface>=3.4.1", |
|
145 | "zope.interface>=3.4.1", | |
142 | "Twisted>=8.0.1", |
|
146 | "Twisted>=8.0.1", | |
143 | "foolscap>=0.2.6" |
|
147 | "foolscap>=0.2.6" | |
144 | ], |
|
148 | ], | |
145 | doc=['Sphinx>=0.3','pygments'], |
|
149 | doc=['Sphinx>=0.3','pygments'], | |
146 | test='nose>=0.10.1', |
|
150 | test='nose>=0.10.1', | |
147 | security=["pyOpenSSL>=0.6"] |
|
151 | security=["pyOpenSSL>=0.6"] | |
148 | ) |
|
152 | ) | |
149 | # Allow setuptools to handle the scripts |
|
153 | # Allow setuptools to handle the scripts | |
150 | scripts = [] |
|
154 | scripts = [] | |
151 | # eggs will lack docs, examples |
|
155 | # eggs will lack docs, examples | |
152 | data_files = [] |
|
156 | data_files = [] | |
153 | else: |
|
157 | else: | |
154 | # package_data of setuptools was introduced to distutils in 2.4 |
|
158 | # package_data of setuptools was introduced to distutils in 2.4 | |
155 | cfgfiles = filter(isfile, glob('IPython/UserConfig/*')) |
|
159 | cfgfiles = filter(isfile, glob('IPython/UserConfig/*')) | |
156 | if sys.version_info < (2,4): |
|
160 | if sys.version_info < (2,4): | |
157 | data_files.append(('lib', 'IPython/UserConfig', cfgfiles)) |
|
161 | data_files.append(('lib', 'IPython/UserConfig', cfgfiles)) | |
158 | # If we are running without setuptools, call this function which will |
|
162 | # If we are running without setuptools, call this function which will | |
159 | # check for dependencies an inform the user what is needed. This is |
|
163 | # check for dependencies an inform the user what is needed. This is | |
160 | # just to make life easy for users. |
|
164 | # just to make life easy for users. | |
161 | check_for_dependencies() |
|
165 | check_for_dependencies() | |
162 |
|
166 | |||
163 |
|
167 | |||
164 | #--------------------------------------------------------------------------- |
|
168 | #--------------------------------------------------------------------------- | |
165 | # Do the actual setup now |
|
169 | # Do the actual setup now | |
166 | #--------------------------------------------------------------------------- |
|
170 | #--------------------------------------------------------------------------- | |
167 |
|
171 | |||
168 | setup_args['packages'] = packages |
|
172 | setup_args['packages'] = packages | |
169 | setup_args['package_data'] = package_data |
|
173 | setup_args['package_data'] = package_data | |
170 | setup_args['scripts'] = scripts |
|
174 | setup_args['scripts'] = scripts | |
171 | setup_args['data_files'] = data_files |
|
175 | setup_args['data_files'] = data_files | |
172 | setup_args.update(setuptools_extra_args) |
|
176 | setup_args.update(setuptools_extra_args) | |
173 |
|
177 | |||
174 | if __name__ == '__main__': |
|
178 | if __name__ == '__main__': | |
175 | setup(**setup_args) |
|
179 | setup(**setup_args) |
@@ -1,244 +1,275 b'' | |||||
1 | # encoding: utf-8 |
|
1 | # encoding: utf-8 | |
2 |
|
2 | |||
3 | """ |
|
3 | """ | |
4 | This module defines the things that are used in setup.py for building IPython |
|
4 | This module defines the things that are used in setup.py for building IPython | |
5 |
|
5 | |||
6 | This includes: |
|
6 | This includes: | |
7 |
|
7 | |||
8 | * The basic arguments to setup |
|
8 | * The basic arguments to setup | |
9 | * Functions for finding things like packages, package data, etc. |
|
9 | * Functions for finding things like packages, package data, etc. | |
10 | * A function for checking dependencies. |
|
10 | * A function for checking dependencies. | |
11 | """ |
|
11 | """ | |
12 |
|
12 | |||
13 | __docformat__ = "restructuredtext en" |
|
13 | __docformat__ = "restructuredtext en" | |
14 |
|
14 | |||
15 | #------------------------------------------------------------------------------- |
|
15 | #------------------------------------------------------------------------------- | |
16 | # Copyright (C) 2008 The IPython Development Team |
|
16 | # Copyright (C) 2008 The IPython Development Team | |
17 | # |
|
17 | # | |
18 | # Distributed under the terms of the BSD License. The full license is in |
|
18 | # Distributed under the terms of the BSD License. The full license is in | |
19 | # the file COPYING, distributed as part of this software. |
|
19 | # the file COPYING, distributed as part of this software. | |
20 | #------------------------------------------------------------------------------- |
|
20 | #------------------------------------------------------------------------------- | |
21 |
|
21 | |||
22 | #------------------------------------------------------------------------------- |
|
22 | #------------------------------------------------------------------------------- | |
23 | # Imports |
|
23 | # Imports | |
24 | #------------------------------------------------------------------------------- |
|
24 | #------------------------------------------------------------------------------- | |
25 |
|
25 | |||
26 | import os, sys |
|
26 | import os, sys | |
27 |
|
27 | |||
28 | from glob import glob |
|
28 | from glob import glob | |
29 |
|
29 | |||
30 | from setupext import install_data_ext |
|
30 | from setupext import install_data_ext | |
31 |
|
31 | |||
32 | #------------------------------------------------------------------------------- |
|
32 | #------------------------------------------------------------------------------- | |
33 | # Useful globals and utility functions |
|
33 | # Useful globals and utility functions | |
34 | #------------------------------------------------------------------------------- |
|
34 | #------------------------------------------------------------------------------- | |
35 |
|
35 | |||
36 | # A few handy globals |
|
36 | # A few handy globals | |
37 | isfile = os.path.isfile |
|
37 | isfile = os.path.isfile | |
38 | pjoin = os.path.join |
|
38 | pjoin = os.path.join | |
39 |
|
39 | |||
40 | def oscmd(s): |
|
40 | def oscmd(s): | |
41 | print ">", s |
|
41 | print ">", s | |
42 | os.system(s) |
|
42 | os.system(s) | |
43 |
|
43 | |||
44 | # A little utility we'll need below, since glob() does NOT allow you to do |
|
44 | # A little utility we'll need below, since glob() does NOT allow you to do | |
45 | # exclusion on multiple endings! |
|
45 | # exclusion on multiple endings! | |
46 | def file_doesnt_endwith(test,endings): |
|
46 | def file_doesnt_endwith(test,endings): | |
47 | """Return true if test is a file and its name does NOT end with any |
|
47 | """Return true if test is a file and its name does NOT end with any | |
48 | of the strings listed in endings.""" |
|
48 | of the strings listed in endings.""" | |
49 | if not isfile(test): |
|
49 | if not isfile(test): | |
50 | return False |
|
50 | return False | |
51 | for e in endings: |
|
51 | for e in endings: | |
52 | if test.endswith(e): |
|
52 | if test.endswith(e): | |
53 | return False |
|
53 | return False | |
54 | return True |
|
54 | return True | |
55 |
|
55 | |||
56 | #--------------------------------------------------------------------------- |
|
56 | #--------------------------------------------------------------------------- | |
57 | # Basic project information |
|
57 | # Basic project information | |
58 | #--------------------------------------------------------------------------- |
|
58 | #--------------------------------------------------------------------------- | |
59 |
|
59 | |||
60 | # Release.py contains version, authors, license, url, keywords, etc. |
|
60 | # Release.py contains version, authors, license, url, keywords, etc. | |
61 | execfile(pjoin('IPython','Release.py')) |
|
61 | execfile(pjoin('IPython','Release.py')) | |
62 |
|
62 | |||
63 | # Create a dict with the basic information |
|
63 | # Create a dict with the basic information | |
64 | # This dict is eventually passed to setup after additional keys are added. |
|
64 | # This dict is eventually passed to setup after additional keys are added. | |
65 | setup_args = dict( |
|
65 | setup_args = dict( | |
66 | name = name, |
|
66 | name = name, | |
67 | version = version, |
|
67 | version = version, | |
68 | description = description, |
|
68 | description = description, | |
69 | long_description = long_description, |
|
69 | long_description = long_description, | |
70 | author = author, |
|
70 | author = author, | |
71 | author_email = author_email, |
|
71 | author_email = author_email, | |
72 | url = url, |
|
72 | url = url, | |
73 | download_url = download_url, |
|
73 | download_url = download_url, | |
74 | license = license, |
|
74 | license = license, | |
75 | platforms = platforms, |
|
75 | platforms = platforms, | |
76 | keywords = keywords, |
|
76 | keywords = keywords, | |
77 | cmdclass = {'install_data': install_data_ext}, |
|
77 | cmdclass = {'install_data': install_data_ext}, | |
78 | ) |
|
78 | ) | |
79 |
|
79 | |||
80 |
|
80 | |||
81 | #--------------------------------------------------------------------------- |
|
81 | #--------------------------------------------------------------------------- | |
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 | """ | |
89 | packages.append('.'.join(['IPython',pname])) |
|
90 | packages.append('.'.join(['IPython',pname])) | |
90 | if config: |
|
91 | if config: | |
91 | packages.append('.'.join(['IPython',pname,'config'])) |
|
92 | packages.append('.'.join(['IPython',pname,'config'])) | |
92 | if tests: |
|
93 | if tests: | |
93 | packages.append('.'.join(['IPython',pname,'tests'])) |
|
94 | packages.append('.'.join(['IPython',pname,'tests'])) | |
94 | if scripts: |
|
95 | if scripts: | |
95 | packages.append('.'.join(['IPython',pname,'scripts'])) |
|
96 | packages.append('.'.join(['IPython',pname,'scripts'])) | |
96 | if others is not None: |
|
97 | if others is not None: | |
97 | for o in others: |
|
98 | for o in others: | |
98 | packages.append('.'.join(['IPython',pname,o])) |
|
99 | packages.append('.'.join(['IPython',pname,o])) | |
99 |
|
100 | |||
100 | def find_packages(): |
|
101 | def find_packages(): | |
101 | """ |
|
102 | """ | |
102 | Find all of IPython's packages. |
|
103 | Find all of IPython's packages. | |
103 | """ |
|
104 | """ | |
104 | packages = ['IPython'] |
|
105 | packages = ['IPython'] | |
105 | add_package(packages, 'config', tests=True) |
|
106 | add_package(packages, 'config', tests=True) | |
106 | add_package(packages , 'Extensions') |
|
107 | add_package(packages , 'Extensions') | |
107 | add_package(packages, 'external') |
|
108 | add_package(packages, 'external') | |
108 | add_package(packages, 'gui') |
|
109 | add_package(packages, 'gui') | |
109 | add_package(packages, 'gui.wx') |
|
110 | add_package(packages, 'gui.wx') | |
110 | add_package(packages, 'frontend', tests=True) |
|
111 | add_package(packages, 'frontend', tests=True) | |
111 | add_package(packages, 'frontend._process') |
|
112 | add_package(packages, 'frontend._process') | |
112 | add_package(packages, 'frontend.wx') |
|
113 | add_package(packages, 'frontend.wx') | |
113 | add_package(packages, 'frontend.cocoa', tests=True) |
|
114 | add_package(packages, 'frontend.cocoa', tests=True) | |
114 | add_package(packages, 'kernel', config=True, tests=True, scripts=True) |
|
115 | add_package(packages, 'kernel', config=True, tests=True, scripts=True) | |
115 | add_package(packages, 'kernel.core', config=True, tests=True) |
|
116 | add_package(packages, 'kernel.core', config=True, tests=True) | |
116 | add_package(packages, 'testing', tests=True) |
|
117 | add_package(packages, 'testing', tests=True) | |
117 | add_package(packages, 'tools', tests=True) |
|
118 | add_package(packages, 'tools', tests=True) | |
118 | add_package(packages, 'UserConfig') |
|
119 | add_package(packages, 'UserConfig') | |
119 | return packages |
|
120 | return packages | |
120 |
|
121 | |||
121 | #--------------------------------------------------------------------------- |
|
122 | #--------------------------------------------------------------------------- | |
122 | # Find package data |
|
123 | # Find package data | |
123 | #--------------------------------------------------------------------------- |
|
124 | #--------------------------------------------------------------------------- | |
124 |
|
125 | |||
125 | def find_package_data(): |
|
126 | def find_package_data(): | |
126 | """ |
|
127 | """ | |
127 | Find IPython's package_data. |
|
128 | Find IPython's package_data. | |
128 | """ |
|
129 | """ | |
129 | # This is not enough for these things to appear in an sdist. |
|
130 | # This is not enough for these things to appear in an sdist. | |
130 | # We need to muck with the MANIFEST to get this to work |
|
131 | # We need to muck with the MANIFEST to get this to work | |
131 | package_data = { |
|
132 | package_data = { | |
132 | 'IPython.UserConfig' : ['*'], |
|
133 | 'IPython.UserConfig' : ['*'], | |
133 | 'IPython.tools.tests' : ['*.txt'], |
|
134 | 'IPython.tools.tests' : ['*.txt'], | |
134 | 'IPython.testing' : ['*.txt'] |
|
135 | 'IPython.testing' : ['*.txt'] | |
135 | } |
|
136 | } | |
136 | return package_data |
|
137 | return package_data | |
137 |
|
138 | |||
138 |
|
139 | |||
139 | #--------------------------------------------------------------------------- |
|
140 | #--------------------------------------------------------------------------- | |
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 | |
176 | ## print 'data files' |
|
207 | ## print 'data files' | |
177 | ## pprint.pprint(data_files) |
|
208 | ## pprint.pprint(data_files) | |
178 | ## print '*'*80 |
|
209 | ## print '*'*80 | |
179 |
|
210 | |||
180 | return data_files |
|
211 | return data_files | |
181 |
|
212 | |||
182 | #--------------------------------------------------------------------------- |
|
213 | #--------------------------------------------------------------------------- | |
183 | # Find scripts |
|
214 | # Find scripts | |
184 | #--------------------------------------------------------------------------- |
|
215 | #--------------------------------------------------------------------------- | |
185 |
|
216 | |||
186 | def find_scripts(): |
|
217 | 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 | |
201 | # post-install scripts MUST reside in the scripts/ dir, otherwise distutils |
|
232 | # post-install scripts MUST reside in the scripts/ dir, otherwise distutils | |
202 | # doesn't find them. |
|
233 | # doesn't find them. | |
203 | if 'bdist_wininst' in sys.argv: |
|
234 | if 'bdist_wininst' in sys.argv: | |
204 | if len(sys.argv) > 2 and ('sdist' in sys.argv or 'bdist_rpm' in sys.argv): |
|
235 | if len(sys.argv) > 2 and ('sdist' in sys.argv or 'bdist_rpm' in sys.argv): | |
205 | print >> sys.stderr,"ERROR: bdist_wininst must be run alone. Exiting." |
|
236 | print >> sys.stderr,"ERROR: bdist_wininst must be run alone. Exiting." | |
206 | sys.exit(1) |
|
237 | sys.exit(1) | |
207 | scripts.append('scripts/ipython_win_post_install.py') |
|
238 | scripts.append('scripts/ipython_win_post_install.py') | |
208 |
|
239 | |||
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(): | |
216 | """Check for IPython's dependencies. |
|
247 | """Check for IPython's dependencies. | |
217 |
|
248 | |||
218 | This function should NOT be called if running under setuptools! |
|
249 | This function should NOT be called if running under setuptools! | |
219 | """ |
|
250 | """ | |
220 | from setupext.setupext import ( |
|
251 | from setupext.setupext import ( | |
221 | print_line, print_raw, print_status, print_message, |
|
252 | print_line, print_raw, print_status, print_message, | |
222 | check_for_zopeinterface, check_for_twisted, |
|
253 | check_for_zopeinterface, check_for_twisted, | |
223 | check_for_foolscap, check_for_pyopenssl, |
|
254 | check_for_foolscap, check_for_pyopenssl, | |
224 | check_for_sphinx, check_for_pygments, |
|
255 | check_for_sphinx, check_for_pygments, | |
225 | check_for_nose, check_for_pexpect |
|
256 | check_for_nose, check_for_pexpect | |
226 | ) |
|
257 | ) | |
227 | print_line() |
|
258 | print_line() | |
228 | print_raw("BUILDING IPYTHON") |
|
259 | print_raw("BUILDING IPYTHON") | |
229 | print_status('python', sys.version) |
|
260 | print_status('python', sys.version) | |
230 | print_status('platform', sys.platform) |
|
261 | print_status('platform', sys.platform) | |
231 | if sys.platform == 'win32': |
|
262 | if sys.platform == 'win32': | |
232 | print_status('Windows version', sys.getwindowsversion()) |
|
263 | print_status('Windows version', sys.getwindowsversion()) | |
233 |
|
264 | |||
234 | print_raw("") |
|
265 | print_raw("") | |
235 | print_raw("OPTIONAL DEPENDENCIES") |
|
266 | print_raw("OPTIONAL DEPENDENCIES") | |
236 |
|
267 | |||
237 | check_for_zopeinterface() |
|
268 | check_for_zopeinterface() | |
238 | check_for_twisted() |
|
269 | check_for_twisted() | |
239 | check_for_foolscap() |
|
270 | check_for_foolscap() | |
240 | check_for_pyopenssl() |
|
271 | check_for_pyopenssl() | |
241 | check_for_sphinx() |
|
272 | check_for_sphinx() | |
242 | check_for_pygments() |
|
273 | check_for_pygments() | |
243 | check_for_nose() |
|
274 | check_for_nose() | |
244 | check_for_pexpect() |
|
275 | check_for_pexpect() |
General Comments 0
You need to be logged in to leave comments.
Login now