Skip to content

Commit e2ad151

Browse files
committed
build in docker
1 parent b94a81f commit e2ad151

File tree

2 files changed

+85
-50
lines changed

2 files changed

+85
-50
lines changed

Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
From python:3
2+
3+
WORKDIR /app
4+
5+
COPY requirements.txt ./requirements.txt
6+
7+
RUN pip3 install -r requirements.txt
8+
9+
RUN apt-get update && \
10+
apt-get install -y git mercurial texlive-full xzdec && \
11+
apt-get clean && \
12+
rm -rf /var/lib/apt/lists/*

conf.py

+73-50
Original file line numberDiff line numberDiff line change
@@ -33,46 +33,46 @@
3333
# ones.
3434

3535
# Add any paths that contain templates here, relative to this directory.
36-
templates_path = ['_templates']
36+
templates_path = ["_templates"]
3737

3838
# The suffix(es) of source filenames.
3939
# You can specify multiple suffix as a list of string:
4040
#
4141
# source_suffix = ['.rst', '.md']
42-
source_suffix = '.rst'
42+
source_suffix = ".rst"
4343

4444
# The master toctree document.
45-
master_doc = 'index'
45+
master_doc = "index"
4646

4747
# General information about the project.
48-
project = u'python-parallel-programming-cookbook-cn'
49-
copyright = u'2017, laixintao'
50-
author = u'laixintao'
48+
project = u"python-parallel-programming-cookbook-cn"
49+
copyright = u"2017, laixintao"
50+
author = u"laixintao"
5151

5252
# The version info for the project you're documenting, acts as replacement for
5353
# |version| and |release|, also used in various other places throughout the
5454
# built documents.
5555
#
5656
# The short X.Y version.
57-
version = u'1.0'
57+
version = u"1.0"
5858

5959
# The full version, including alpha/beta/rc tags.
60-
release = u'1.0'
60+
release = u"1.0"
6161

6262
# The language for content autogenerated by Sphinx. Refer to documentation
6363
# for a list of supported languages.
6464
#
6565
# This is also used if you do content translation via gettext catalogs.
6666
# Usually you set "language" from the command line for these cases.
67-
language = 'zh_CN'
67+
language = "zh_CN"
6868

6969
# List of patterns, relative to source directory, that match files and
7070
# directories to ignore when looking for source files.
7171
# This patterns also effect to html_static_path and html_extra_path
72-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
72+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
7373

7474
# The name of the Pygments (syntax highlighting) style to use.
75-
pygments_style = 'sphinx'
75+
pygments_style = "sphinx"
7676

7777
# If true, `todo` and `todoList` produce output, else they produce nothing.
7878
todo_include_todos = False
@@ -83,7 +83,7 @@
8383
# The theme to use for HTML and HTML Help pages. See the documentation for
8484
# a list of builtin themes.
8585
#
86-
html_theme = 'sphinx_rtd_theme'
86+
html_theme = "sphinx_rtd_theme"
8787

8888
# Theme options are theme-specific and customize the look and feel of a theme
8989
# further. For a list of options available for each theme, see the
@@ -102,57 +102,69 @@
102102
# This is required for the alabaster theme
103103
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
104104
html_sidebars = {
105-
'**': [
106-
'about.html',
107-
'navigation.html',
108-
'relations.html', # needs 'show_related': True theme option to display
109-
'searchbox.html',
110-
'donate.html',
105+
"**": [
106+
"about.html",
107+
"navigation.html",
108+
"relations.html", # needs 'show_related': True theme option to display
109+
"searchbox.html",
110+
"donate.html",
111111
]
112112
}
113113

114114

115115
# -- Options for HTMLHelp output ------------------------------------------
116116

117117
# Output file base name for HTML help builder.
118-
htmlhelp_basename = 'python-parallel-programming-cookbook-cndoc'
118+
htmlhelp_basename = "python-parallel-programming-cookbook-cndoc"
119119

120120

121121
# -- Options for LaTeX output ---------------------------------------------
122122

123123
latex_elements = {
124-
# The paper size ('letterpaper' or 'a4paper').
125-
#'papersize': 'letterpaper',
126-
127-
# The font size ('10pt', '11pt' or '12pt').
128-
#'pointsize': '10pt',
129-
130-
# Additional stuff for the LaTeX preamble.
131-
#'preamble': '',
132-
'preamble': r'''
133-
\hypersetup{unicode=true}
134-
\usepackage{CJKutf8}
135-
\DeclareUnicodeCharacter{00A0}{\nobreakspace}
136-
\DeclareUnicodeCharacter{2203}{\ensuremath{\exists}}
137-
\DeclareUnicodeCharacter{2200}{\ensuremath{\forall}}
138-
\DeclareUnicodeCharacter{2286}{\ensuremath{\subseteq}}
139-
\DeclareUnicodeCharacter{2713}{x}
140-
\DeclareUnicodeCharacter{27FA}{\ensuremath{\Longleftrightarrow}}
141-
\DeclareUnicodeCharacter{221A}{\ensuremath{\sqrt{}}}
142-
\DeclareUnicodeCharacter{221B}{\ensuremath{\sqrt[3]{}}}
143-
\DeclareUnicodeCharacter{2295}{\ensuremath{\oplus}}
144-
\DeclareUnicodeCharacter{2297}{\ensuremath{\otimes}}
145-
\begin{CJK}{UTF8}{gbsn}
146-
\AtEndDocument{\end{CJK}}
147-
''',
124+
"preamble": """
125+
\\hypersetup{unicode=true}
126+
\\usepackage{CJKutf8}
127+
\\AtBeginDocument{\\begin{CJK}{UTF8}{gbsn}}
128+
\\AtEndDocument{\\end{CJK}}
129+
"""
148130
}
149131

132+
# latex_elements = {
133+
# # The paper size ('letterpaper' or 'a4paper').
134+
# # 'papersize': 'letterpaper',
135+
# # The font size ('10pt', '11pt' or '12pt').
136+
# # 'pointsize': '10pt',
137+
# # Additional stuff for the LaTeX preamble.
138+
# # 'preamble': '',
139+
# "preamble": r"""
140+
# \hypersetup{unicode=true}
141+
# \usepackage{CJKutf8}
142+
# \DeclareUnicodeCharacter{00A0}{\nobreakspace}
143+
# \DeclareUnicodeCharacter{2203}{\ensuremath{\exists}}
144+
# \DeclareUnicodeCharacter{2200}{\ensuremath{\forall}}
145+
# \DeclareUnicodeCharacter{2286}{\ensuremath{\subseteq}}
146+
# \DeclareUnicodeCharacter{2713}{x}
147+
# \DeclareUnicodeCharacter{27FA}{\ensuremath{\Longleftrightarrow}}
148+
# \DeclareUnicodeCharacter{221A}{\ensuremath{\sqrt{}}}
149+
# \DeclareUnicodeCharacter{221B}{\ensuremath{\sqrt[3]{}}}
150+
# \DeclareUnicodeCharacter{2295}{\ensuremath{\oplus}}
151+
# \DeclareUnicodeCharacter{2297}{\ensuremath{\otimes}}
152+
# \begin{CJK}{UTF8}{gbsn}
153+
# \AtEndDocument{\end{CJK}}
154+
# """
155+
# }
156+
150157
# Grouping the document tree into LaTeX files. List of tuples
151158
# (source start file, target name, title,
152159
# author, documentclass [howto, manual, or own class]).
153160
latex_documents = [
154-
(master_doc, 'python-parallel-programming-cookbook-cn.tex', u'python-parallel-programming-cookbook-cn Documentation',
155-
u'laixintao', 'manual'),
161+
(
162+
master_doc,
163+
"python-parallel-programming-cookbook-cn.tex",
164+
u"python-parallel-programming-cookbook-cn Documentation",
165+
u"laixintao",
166+
"manual",
167+
)
156168
]
157169

158170

@@ -161,8 +173,13 @@
161173
# One entry per manual page. List of tuples
162174
# (source start file, name, description, authors, manual section).
163175
man_pages = [
164-
(master_doc, 'python-parallel-programming-cookbook-cn', u'python-parallel-programming-cookbook-cn Documentation',
165-
[author], 1)
176+
(
177+
master_doc,
178+
"python-parallel-programming-cookbook-cn",
179+
u"python-parallel-programming-cookbook-cn Documentation",
180+
[author],
181+
1,
182+
)
166183
]
167184

168185

@@ -172,9 +189,15 @@
172189
# (source start file, target name, title, author,
173190
# dir menu entry, description, category)
174191
texinfo_documents = [
175-
(master_doc, 'python-parallel-programming-cookbook-cn', u'python-parallel-programming-cookbook-cn Documentation',
176-
author, 'python-parallel-programming-cookbook-cn', 'One line description of project.',
177-
'Miscellaneous'),
192+
(
193+
master_doc,
194+
"python-parallel-programming-cookbook-cn",
195+
u"python-parallel-programming-cookbook-cn Documentation",
196+
author,
197+
"python-parallel-programming-cookbook-cn",
198+
"One line description of project.",
199+
"Miscellaneous",
200+
)
178201
]
179202

180203
rst_epilog = u"""

0 commit comments

Comments
 (0)