kameleon-builder 2.0.0.dev

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. data/.editorconfig +23 -0
  2. data/.env +51 -0
  3. data/.gitignore +22 -0
  4. data/AUTHORS +19 -0
  5. data/CHANGELOG +36 -0
  6. data/COPYING +340 -0
  7. data/Gemfile +4 -0
  8. data/README.md +53 -0
  9. data/Rakefile +24 -0
  10. data/Vagrantfile +68 -0
  11. data/bin/kameleon +16 -0
  12. data/contrib/kameleon_bashrc.sh +138 -0
  13. data/contrib/scripts/VirtualBox_deploy.sh +12 -0
  14. data/contrib/scripts/chroot_env +9 -0
  15. data/contrib/scripts/create_passwd.py +17 -0
  16. data/contrib/scripts/umount-chroot.sh +290 -0
  17. data/contrib/steps/bootstrap/debian/bootstrap_if_needed.yaml +47 -0
  18. data/contrib/steps/bootstrap/debian/bootstrap_static.yaml +38 -0
  19. data/contrib/steps/setup/add_timestamp.yaml +6 -0
  20. data/contrib/steps/setup/autologin.yaml +16 -0
  21. data/contrib/steps/setup/copy_ssh_auth_file.yaml +10 -0
  22. data/contrib/steps/setup/debian/add_network_interface.yaml +7 -0
  23. data/contrib/steps/setup/debian/cluster_tools_install.yaml +16 -0
  24. data/contrib/steps/setup/debian/network_config_static.yaml +17 -0
  25. data/contrib/steps/setup/generate_user_ssh_key.yaml +15 -0
  26. data/contrib/steps/setup/install_my_ssh_key.yaml +26 -0
  27. data/contrib/steps/setup/make_swap_file.yaml +9 -0
  28. data/contrib/steps/setup/root_ssh_config.yaml +18 -0
  29. data/contrib/steps/setup/set_user_password.yaml +7 -0
  30. data/contrib/steps/setup/system_optimization.yaml +8 -0
  31. data/docs/.gitignore +1 -0
  32. data/docs/Makefile +177 -0
  33. data/docs/make.bat +242 -0
  34. data/docs/source/_static/.gitignore +0 -0
  35. data/docs/source/aliases.rst +29 -0
  36. data/docs/source/checkpoint.rst +28 -0
  37. data/docs/source/cli.rst +3 -0
  38. data/docs/source/commands.rst +62 -0
  39. data/docs/source/conf.py +254 -0
  40. data/docs/source/context.rst +42 -0
  41. data/docs/source/faq.rst +3 -0
  42. data/docs/source/getting_started.rst +3 -0
  43. data/docs/source/index.rst +38 -0
  44. data/docs/source/installation.rst +3 -0
  45. data/docs/source/recipe.rst +256 -0
  46. data/docs/source/why.rst +3 -0
  47. data/docs/source/workspace.rst +11 -0
  48. data/kameleon-builder.gemspec +37 -0
  49. data/lib/kameleon.rb +75 -0
  50. data/lib/kameleon/cli.rb +176 -0
  51. data/lib/kameleon/context.rb +83 -0
  52. data/lib/kameleon/engine.rb +357 -0
  53. data/lib/kameleon/environment.rb +38 -0
  54. data/lib/kameleon/error.rb +51 -0
  55. data/lib/kameleon/logger.rb +53 -0
  56. data/lib/kameleon/recipe.rb +474 -0
  57. data/lib/kameleon/shell.rb +290 -0
  58. data/lib/kameleon/step.rb +213 -0
  59. data/lib/kameleon/utils.rb +45 -0
  60. data/lib/kameleon/version.rb +3 -0
  61. data/templates/COPYRIGHT +21 -0
  62. data/templates/aliases/defaults.yaml +83 -0
  63. data/templates/checkpoints/docker.yaml +14 -0
  64. data/templates/checkpoints/qcow2.yaml +44 -0
  65. data/templates/debian-wheezy-chroot.yaml +98 -0
  66. data/templates/debian-wheezy-docker.yaml +97 -0
  67. data/templates/fedora-docker.yaml +96 -0
  68. data/templates/steps/bootstrap/debian/debootstrap.yaml +13 -0
  69. data/templates/steps/bootstrap/fedora/docker_bootstrap.yaml +25 -0
  70. data/templates/steps/bootstrap/fedora/yum_bootstrap.yaml +22 -0
  71. data/templates/steps/bootstrap/prepare_appliance_with_nbd.yaml +93 -0
  72. data/templates/steps/bootstrap/prepare_docker.yaml +38 -0
  73. data/templates/steps/bootstrap/start_chroot.yaml +53 -0
  74. data/templates/steps/bootstrap/start_docker.yaml +12 -0
  75. data/templates/steps/export/build_appliance_from_docker.yaml +105 -0
  76. data/templates/steps/export/clean_appliance.yaml +3 -0
  77. data/templates/steps/export/save_appliance_from_nbd.yaml +54 -0
  78. data/templates/steps/setup/create_user.yaml +12 -0
  79. data/templates/steps/setup/debian/kernel_install.yaml +20 -0
  80. data/templates/steps/setup/debian/keyboard_config.yaml +10 -0
  81. data/templates/steps/setup/debian/network_config.yaml +30 -0
  82. data/templates/steps/setup/debian/software_install.yaml +15 -0
  83. data/templates/steps/setup/debian/system_config.yaml +12 -0
  84. data/templates/steps/setup/fedora/kernel_install.yaml +27 -0
  85. data/templates/steps/setup/fedora/software_install.yaml +10 -0
  86. data/tests/helper.rb +22 -0
  87. data/tests/recipes/dummy_recipe.yaml +48 -0
  88. data/tests/recipes/steps/bootstrap/dummy_distro/dummy_bootstrap_static.yaml +4 -0
  89. data/tests/recipes/steps/export/dummy_save_appliance.yaml +9 -0
  90. data/tests/recipes/steps/setup/default/dummy_root_passwd.yaml +8 -0
  91. data/tests/recipes/steps/setup/dummy_distro/dummy_software_install.yaml +7 -0
  92. data/tests/test_context.rb +16 -0
  93. data/tests/test_recipe.rb +15 -0
  94. data/tests/test_version.rb +9 -0
  95. metadata +300 -0
data/docs/make.bat ADDED
@@ -0,0 +1,242 @@
1
+ @ECHO OFF
2
+
3
+ REM Command file for Sphinx documentation
4
+
5
+ if "%SPHINXBUILD%" == "" (
6
+ set SPHINXBUILD=sphinx-build
7
+ )
8
+ set BUILDDIR=build
9
+ set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
10
+ set I18NSPHINXOPTS=%SPHINXOPTS% source
11
+ if NOT "%PAPER%" == "" (
12
+ set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
13
+ set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
14
+ )
15
+
16
+ if "%1" == "" goto help
17
+
18
+ if "%1" == "help" (
19
+ :help
20
+ echo.Please use `make ^<target^>` where ^<target^> is one of
21
+ echo. html to make standalone HTML files
22
+ echo. dirhtml to make HTML files named index.html in directories
23
+ echo. singlehtml to make a single large HTML file
24
+ echo. pickle to make pickle files
25
+ echo. json to make JSON files
26
+ echo. htmlhelp to make HTML files and a HTML help project
27
+ echo. qthelp to make HTML files and a qthelp project
28
+ echo. devhelp to make HTML files and a Devhelp project
29
+ echo. epub to make an epub
30
+ echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
31
+ echo. text to make text files
32
+ echo. man to make manual pages
33
+ echo. texinfo to make Texinfo files
34
+ echo. gettext to make PO message catalogs
35
+ echo. changes to make an overview over all changed/added/deprecated items
36
+ echo. xml to make Docutils-native XML files
37
+ echo. pseudoxml to make pseudoxml-XML files for display purposes
38
+ echo. linkcheck to check all external links for integrity
39
+ echo. doctest to run all doctests embedded in the documentation if enabled
40
+ goto end
41
+ )
42
+
43
+ if "%1" == "clean" (
44
+ for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
45
+ del /q /s %BUILDDIR%\*
46
+ goto end
47
+ )
48
+
49
+
50
+ %SPHINXBUILD% 2> nul
51
+ if errorlevel 9009 (
52
+ echo.
53
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
54
+ echo.installed, then set the SPHINXBUILD environment variable to point
55
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
56
+ echo.may add the Sphinx directory to PATH.
57
+ echo.
58
+ echo.If you don't have Sphinx installed, grab it from
59
+ echo.http://sphinx-doc.org/
60
+ exit /b 1
61
+ )
62
+
63
+ if "%1" == "html" (
64
+ %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
65
+ if errorlevel 1 exit /b 1
66
+ echo.
67
+ echo.Build finished. The HTML pages are in %BUILDDIR%/html.
68
+ goto end
69
+ )
70
+
71
+ if "%1" == "dirhtml" (
72
+ %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
73
+ if errorlevel 1 exit /b 1
74
+ echo.
75
+ echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
76
+ goto end
77
+ )
78
+
79
+ if "%1" == "singlehtml" (
80
+ %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
81
+ if errorlevel 1 exit /b 1
82
+ echo.
83
+ echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
84
+ goto end
85
+ )
86
+
87
+ if "%1" == "pickle" (
88
+ %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
89
+ if errorlevel 1 exit /b 1
90
+ echo.
91
+ echo.Build finished; now you can process the pickle files.
92
+ goto end
93
+ )
94
+
95
+ if "%1" == "json" (
96
+ %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
97
+ if errorlevel 1 exit /b 1
98
+ echo.
99
+ echo.Build finished; now you can process the JSON files.
100
+ goto end
101
+ )
102
+
103
+ if "%1" == "htmlhelp" (
104
+ %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
105
+ if errorlevel 1 exit /b 1
106
+ echo.
107
+ echo.Build finished; now you can run HTML Help Workshop with the ^
108
+ .hhp project file in %BUILDDIR%/htmlhelp.
109
+ goto end
110
+ )
111
+
112
+ if "%1" == "qthelp" (
113
+ %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
114
+ if errorlevel 1 exit /b 1
115
+ echo.
116
+ echo.Build finished; now you can run "qcollectiongenerator" with the ^
117
+ .qhcp project file in %BUILDDIR%/qthelp, like this:
118
+ echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Kameleon.qhcp
119
+ echo.To view the help file:
120
+ echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Kameleon.ghc
121
+ goto end
122
+ )
123
+
124
+ if "%1" == "devhelp" (
125
+ %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
126
+ if errorlevel 1 exit /b 1
127
+ echo.
128
+ echo.Build finished.
129
+ goto end
130
+ )
131
+
132
+ if "%1" == "epub" (
133
+ %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
134
+ if errorlevel 1 exit /b 1
135
+ echo.
136
+ echo.Build finished. The epub file is in %BUILDDIR%/epub.
137
+ goto end
138
+ )
139
+
140
+ if "%1" == "latex" (
141
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
142
+ if errorlevel 1 exit /b 1
143
+ echo.
144
+ echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
145
+ goto end
146
+ )
147
+
148
+ if "%1" == "latexpdf" (
149
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
150
+ cd %BUILDDIR%/latex
151
+ make all-pdf
152
+ cd %BUILDDIR%/..
153
+ echo.
154
+ echo.Build finished; the PDF files are in %BUILDDIR%/latex.
155
+ goto end
156
+ )
157
+
158
+ if "%1" == "latexpdfja" (
159
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
160
+ cd %BUILDDIR%/latex
161
+ make all-pdf-ja
162
+ cd %BUILDDIR%/..
163
+ echo.
164
+ echo.Build finished; the PDF files are in %BUILDDIR%/latex.
165
+ goto end
166
+ )
167
+
168
+ if "%1" == "text" (
169
+ %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
170
+ if errorlevel 1 exit /b 1
171
+ echo.
172
+ echo.Build finished. The text files are in %BUILDDIR%/text.
173
+ goto end
174
+ )
175
+
176
+ if "%1" == "man" (
177
+ %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
178
+ if errorlevel 1 exit /b 1
179
+ echo.
180
+ echo.Build finished. The manual pages are in %BUILDDIR%/man.
181
+ goto end
182
+ )
183
+
184
+ if "%1" == "texinfo" (
185
+ %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
186
+ if errorlevel 1 exit /b 1
187
+ echo.
188
+ echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
189
+ goto end
190
+ )
191
+
192
+ if "%1" == "gettext" (
193
+ %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
194
+ if errorlevel 1 exit /b 1
195
+ echo.
196
+ echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
197
+ goto end
198
+ )
199
+
200
+ if "%1" == "changes" (
201
+ %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
202
+ if errorlevel 1 exit /b 1
203
+ echo.
204
+ echo.The overview file is in %BUILDDIR%/changes.
205
+ goto end
206
+ )
207
+
208
+ if "%1" == "linkcheck" (
209
+ %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
210
+ if errorlevel 1 exit /b 1
211
+ echo.
212
+ echo.Link check complete; look for any errors in the above output ^
213
+ or in %BUILDDIR%/linkcheck/output.txt.
214
+ goto end
215
+ )
216
+
217
+ if "%1" == "doctest" (
218
+ %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
219
+ if errorlevel 1 exit /b 1
220
+ echo.
221
+ echo.Testing of doctests in the sources finished, look at the ^
222
+ results in %BUILDDIR%/doctest/output.txt.
223
+ goto end
224
+ )
225
+
226
+ if "%1" == "xml" (
227
+ %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
228
+ if errorlevel 1 exit /b 1
229
+ echo.
230
+ echo.Build finished. The XML files are in %BUILDDIR%/xml.
231
+ goto end
232
+ )
233
+
234
+ if "%1" == "pseudoxml" (
235
+ %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
236
+ if errorlevel 1 exit /b 1
237
+ echo.
238
+ echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
239
+ goto end
240
+ )
241
+
242
+ :end
File without changes
@@ -0,0 +1,29 @@
1
+ -------
2
+ Aliases
3
+ -------
4
+
5
+ The aliases can be used anywhere instead of a Kameleon command. Some aliases
6
+ are provided with the templates in the ``aliases/defaults.yaml`` files within
7
+ your workspace. You can add your own aliases in this file.
8
+
9
+ An alias is define by his name as a key and a list of commands as a value. You
10
+ can call an alias with any number of arguments given in a list.
11
+
12
+ The alias access to this arguments using the ``@arg_index`` notation. The
13
+ argument index start at 1. So, ``@1`` is the first argument ``@2`` is the
14
+ second ans so on.
15
+
16
+ A good example is the alias define to copy from the out to the in context:
17
+
18
+ .. code-block:: yaml
19
+
20
+ # alias definition
21
+ out2in:
22
+ - exec_in: mkdir -p $(dirname @2)
23
+ - pipe:
24
+ - exec_out: cat @1
25
+ - exec_in: cat > @2
26
+ # alias call
27
+ out2in:
28
+ - ./my_file_out
29
+ - ./copy_of_my_file_in
@@ -0,0 +1,28 @@
1
+ ----------
2
+ Checkpoint
3
+ ----------
4
+
5
+ Kameleon provide a modular Checkpoint mechanism. Indeed, Kameleon give you the
6
+ possibility to implement your own checkpoint mechanism, using for example the
7
+ snapshot feature of your underneath filesystem. To do so, you have to fill in a
8
+ YAML file, located in the ``checkpoints`` folder of your workspace, in which
9
+ you have to define 4 commands:
10
+
11
+ create
12
+ The checkpoint first creation command
13
+
14
+ apply
15
+ The command applies a previous checkpoint state before starting build
16
+
17
+ clear
18
+ Remove all checkpoints
19
+
20
+ list
21
+ List the available checkpoints
22
+
23
+ You can use the Kameleon current microstep id in your command with like this
24
+ ``@microstep_id``.
25
+
26
+ The checkpoint is selected in the recipe with a key/value couple where the
27
+ value is the checkpoint yaml file name: ``checkpoint: my_checkpoint_file.yaml``
28
+
@@ -0,0 +1,3 @@
1
+ ----------------------
2
+ Command-line interface
3
+ ----------------------
@@ -0,0 +1,62 @@
1
+ --------
2
+ Commands
3
+ --------
4
+
5
+ Each command is a {key => value} pair. The key is the Kameleon command name,
6
+ and the value is the argument for this command.
7
+
8
+ Exec
9
+ ~~~~
10
+
11
+ The exec command is a simple command execute, in the given context, the user
12
+ command in argument. The context is specified by the name suffix local, out or
13
+ in like this ``exec_[in/out/local]``.
14
+
15
+ It is currently used most to execute bash script, but you can use any tools
16
+ callable with bash.
17
+
18
+ For example this command save the message "Hello world:" in the hello.txt file
19
+ within the workdir of the *in* context:
20
+
21
+ .. code-block:: yaml
22
+
23
+ - exec_in: echo "Hello world!" > hello.txt
24
+
25
+ Pipe
26
+ ~~~~
27
+
28
+ The ``pipe`` command allow to transfert any content from one context to
29
+ another. It takes exec command in arguments.
30
+
31
+ The transfert is done by sending the STDOUT of the first command to the STDIN
32
+ of the second.
33
+
34
+ For example, this pipe command copy my_file located in the out context workdir
35
+ to the new_file within the in context workdir:
36
+
37
+ .. code-block:: yaml
38
+
39
+ - pipe:
40
+ - exec_out: cat my_file
41
+ - exec_in: cat > new_file
42
+
43
+ This command are usually not used directly but with Aliases_.
44
+
45
+ Hooks
46
+ ~~~~~
47
+
48
+ The hook commands are design to defer some initialization or clean actions. It
49
+ takes a list of exec and pipe command in arguments. They are named like this
50
+ ``on_[section]_init`` and ``on_[section]_clean``.
51
+
52
+ The section inside the command define on which section this clean will be
53
+ executed. If the section is not specified the hook will be executed at the init
54
+ or the clean of the current step.
55
+
56
+ For example, if you want to clean the ``/tmp`` folder at the end of the setup,
57
+ you can add anywhere in a step:
58
+
59
+ .. code-block:: yaml
60
+
61
+ - on_setup_clean:
62
+ - exec_in: rm -rf /tmp/mytemp
@@ -0,0 +1,254 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Kameleon documentation build configuration file, created by
4
+ # sphinx-quickstart on Thu Feb 13 14:02:53 2014.
5
+ #
6
+ # This file is execfile()d with the current directory set to its
7
+ # containing dir.
8
+ #
9
+ # Note that not all possible configuration values are present in this
10
+ # autogenerated file.
11
+ #
12
+ # All configuration values have a default; values that are commented out
13
+ # serve to show the default.
14
+
15
+ import os
16
+ import datetime
17
+ # If extensions (or modules to document with autodoc) are in another directory,
18
+ # add these directories to sys.path here. If the directory is relative to the
19
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
20
+ #sys.path.insert(0, os.path.abspath('.'))
21
+
22
+ # -- General configuration ------------------------------------------------
23
+
24
+ # If your documentation needs a minimal Sphinx version, state it here.
25
+ #needs_sphinx = '1.0'
26
+
27
+ # Add any Sphinx extension module names here, as strings. They can be
28
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
29
+ # ones.
30
+ extensions = []
31
+
32
+ # Add any paths that contain templates here, relative to this directory.
33
+ templates_path = ['_templates']
34
+
35
+ # The suffix of source filenames.
36
+ source_suffix = '.rst'
37
+
38
+ # The encoding of source files.
39
+ #source_encoding = 'utf-8-sig'
40
+
41
+ # The master toctree document.
42
+ master_doc = 'index'
43
+
44
+ # General information about the project.
45
+ project = u'Kameleon'
46
+ copyright = u'%s, Inria.fr' % datetime.datetime.now().year
47
+
48
+ # The version info for the project you're documenting, acts as replacement for
49
+ # |version| and |release|, also used in various other places throughout the
50
+ # built documents.
51
+ #
52
+ # The short X.Y version.
53
+ version = '2.0.0b1'
54
+ # The full version, including alpha/beta/rc tags.
55
+ release = '2.0.0b1'
56
+
57
+ # The language for content autogenerated by Sphinx. Refer to documentation
58
+ # for a list of supported languages.
59
+ #language = None
60
+
61
+ # There are two options for replacing |today|: either, you set today to some
62
+ # non-false value, then it is used:
63
+ #today = ''
64
+ # Else, today_fmt is used as the format for a strftime call.
65
+ #today_fmt = '%B %d, %Y'
66
+
67
+ # List of patterns, relative to source directory, that match files and
68
+ # directories to ignore when looking for source files.
69
+ exclude_patterns = ['_build']
70
+
71
+ # The reST default role (used for this markup: `text`) to use for all
72
+ # documents.
73
+ #default_role = None
74
+
75
+ # If true, '()' will be appended to :func: etc. cross-reference text.
76
+ #add_function_parentheses = True
77
+
78
+ # If true, the current module name will be prepended to all description
79
+ # unit titles (such as .. function::).
80
+ #add_module_names = True
81
+
82
+ # If true, sectionauthor and moduleauthor directives will be shown in the
83
+ # output. They are ignored by default.
84
+ #show_authors = False
85
+
86
+ # The name of the Pygments (syntax highlighting) style to use.
87
+ pygments_style = 'sphinx'
88
+
89
+ # A list of ignored prefixes for module index sorting.
90
+ #modindex_common_prefix = []
91
+
92
+ # If true, keep warnings as "system message" paragraphs in the built documents.
93
+ #keep_warnings = False
94
+
95
+
96
+ # -- Options for HTML output ----------------------------------------------
97
+
98
+ # The theme to use for HTML and HTML Help pages. See the documentation for
99
+ # a list of builtin themes.
100
+ # on_rtd is whether we are on readthedocs.org
101
+ on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
102
+
103
+ if not on_rtd: # only import and set the theme if we're building docs locally
104
+ import sphinx_rtd_theme
105
+ html_theme = 'sphinx_rtd_theme'
106
+ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
107
+
108
+ # Theme options are theme-specific and customize the look and feel of a theme
109
+ # further. For a list of options available for each theme, see the
110
+ # documentation.
111
+ #html_theme_options = {}
112
+
113
+ # Add any paths that contain custom themes here, relative to this directory.
114
+ #html_theme_path = []
115
+
116
+ # The name for this set of Sphinx documents. If None, it defaults to
117
+ # "<project> v<release> documentation".
118
+ #html_title = None
119
+
120
+ # A shorter title for the navigation bar. Default is the same as html_title.
121
+ #html_short_title = None
122
+
123
+ # The name of an image file (relative to this directory) to place at the top
124
+ # of the sidebar.
125
+ #html_logo = None
126
+
127
+ # The name of an image file (within the static path) to use as favicon of the
128
+ # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
129
+ # pixels large.
130
+ #html_favicon = None
131
+
132
+ # Add any paths that contain custom static files (such as style sheets) here,
133
+ # relative to this directory. They are copied after the builtin static files,
134
+ # so a file named "default.css" will overwrite the builtin "default.css".
135
+ html_static_path = ['_static']
136
+
137
+ # Add any extra paths that contain custom files (such as robots.txt or
138
+ # .htaccess) here, relative to this directory. These files are copied
139
+ # directly to the root of the documentation.
140
+ #html_extra_path = []
141
+
142
+ # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
143
+ # using the given strftime format.
144
+ #html_last_updated_fmt = '%b %d, %Y'
145
+
146
+ # If true, SmartyPants will be used to convert quotes and dashes to
147
+ # typographically correct entities.
148
+ #html_use_smartypants = True
149
+
150
+ # Custom sidebar templates, maps document names to template names.
151
+ # html_sidebars = {'**': ['sidebarintro.html', 'localtoc.html']}
152
+
153
+ # Additional templates that should be rendered to pages, maps page names to
154
+ # template names.
155
+ #html_additional_pages = {}
156
+
157
+ # If false, no module index is generated.
158
+ #html_domain_indices = True
159
+
160
+ # If false, no index is generated.
161
+ #html_use_index = True
162
+
163
+ # If true, the index is split into individual pages for each letter.
164
+ #html_split_index = False
165
+
166
+ # If true, links to the reST sources are added to the pages.
167
+ #html_show_sourcelink = True
168
+
169
+ # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
170
+ #html_show_sphinx = True
171
+
172
+ # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
173
+ #html_show_copyright = True
174
+
175
+ # If true, an OpenSearch description file will be output, and all pages will
176
+ # contain a <link> tag referring to it. The value of this option must be the
177
+ # base URL from which the finished HTML is served.
178
+ #html_use_opensearch = ''
179
+
180
+ # This is the file name suffix for HTML files (e.g. ".xhtml").
181
+ #html_file_suffix = None
182
+
183
+ # Output file base name for HTML help builder.
184
+ htmlhelp_basename = 'Kameleondoc'
185
+
186
+
187
+ # -- Options for LaTeX output ---------------------------------------------
188
+
189
+ latex_elements = {}
190
+
191
+ # Grouping the document tree into LaTeX files. List of tuples
192
+ # (source start file, target name, title,
193
+ # author, documentclass [howto, manual, or own class]).
194
+ latex_documents = [
195
+ ('index', 'Kameleon.tex', u'Kameleon Documentation',
196
+ u'Salem Harrache, Michael Mercier', 'manual'),
197
+ ]
198
+
199
+ # The name of an image file (relative to this directory) to place at the top of
200
+ # the title page.
201
+ #latex_logo = None
202
+
203
+ # For "manual" documents, if this is true, then toplevel headings are parts,
204
+ # not chapters.
205
+ #latex_use_parts = False
206
+
207
+ # If true, show page references after internal links.
208
+ #latex_show_pagerefs = False
209
+
210
+ # If true, show URL addresses after external links.
211
+ #latex_show_urls = False
212
+
213
+ # Documents to append as an appendix to all manuals.
214
+ #latex_appendices = []
215
+
216
+ # If false, no module index is generated.
217
+ #latex_domain_indices = True
218
+
219
+
220
+ # -- Options for manual page output ---------------------------------------
221
+
222
+ # One entry per manual page. List of tuples
223
+ # (source start file, name, description, authors, manual section).
224
+ man_pages = [
225
+ ('index', 'kameleon', u'Kameleon Documentation',
226
+ [u'Salem Harrache', u'Michael Mercier'], 1)
227
+ ]
228
+
229
+ # If true, show URL addresses after external links.
230
+ #man_show_urls = False
231
+
232
+
233
+ # -- Options for Texinfo output -------------------------------------------
234
+
235
+ # Grouping the document tree into Texinfo files. List of tuples
236
+ # (source start file, target name, title, author,
237
+ # dir menu entry, description, category)
238
+ texinfo_documents = [
239
+ ('index', 'Kameleon', u'Kameleon Documentation',
240
+ u'Salem Harrache, Michael Mercier', 'Kameleon',
241
+ 'One line description of project.', 'Miscellaneous'),
242
+ ]
243
+
244
+ # Documents to append as an appendix to all manuals.
245
+ #texinfo_appendices = []
246
+
247
+ # If false, no module index is generated.
248
+ #texinfo_domain_indices = True
249
+
250
+ # How to display URL addresses: 'footnote', 'no', or 'inline'.
251
+ #texinfo_show_urls = 'footnote'
252
+
253
+ # If true, do not generate a @detailmenu in the "Top" node's menu.
254
+ #texinfo_no_detailmenu = False