Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cae7792

Browse files
committedOct 25, 2021
style: run pre-commit
1 parent d4c4b85 commit cae7792

File tree

7 files changed

+314
-244
lines changed

7 files changed

+314
-244
lines changed
 

‎.github/workflows/conda.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
python-version: ${{ matrix.python-version }}
3232
channels: conda-forge
33-
33+
3434
- name: Prepare
3535
run: conda install conda-build conda-verify
3636

‎.pre-commit-config.yaml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# To use:
2+
#
3+
# pre-commit run -a
4+
#
5+
# Or:
6+
#
7+
# pre-commit install # (runs every time you commit in git)
8+
#
9+
# To update this file:
10+
#
11+
# pre-commit autoupdate
12+
#
13+
# See https://github.com/pre-commit/pre-commit
14+
15+
ci:
16+
autoupdate_commit_msg: "chore: update pre-commit hooks"
17+
autofix_commit_msg: "style: pre-commit fixes"
18+
19+
repos:
20+
# Standard hooks
21+
- repo: https://github.com/pre-commit/pre-commit-hooks
22+
rev: v4.0.1
23+
hooks:
24+
- id: check-added-large-files
25+
- id: check-case-conflict
26+
- id: check-merge-conflict
27+
- id: check-symlinks
28+
- id: check-yaml
29+
exclude: ^conda\.recipe/meta\.yaml$
30+
- id: debug-statements
31+
- id: end-of-file-fixer
32+
- id: mixed-line-ending
33+
- id: requirements-txt-fixer
34+
- id: trailing-whitespace
35+
36+
# Black, the code formatter, natively supports pre-commit
37+
- repo: https://github.com/psf/black
38+
rev: 21.9b0
39+
hooks:
40+
- id: black
41+
files: ^(docs)
42+
43+
# Sort your imports in a standard form
44+
- repo: https://github.com/PyCQA/isort
45+
rev: 5.9.3
46+
hooks:
47+
- id: isort
48+
49+
# Upgrade older Python syntax
50+
- repo: https://github.com/asottile/pyupgrade
51+
rev: v2.29.0
52+
hooks:
53+
- id: pyupgrade
54+
args: ["--py36-plus"]
55+
56+
# Changes tabs to spaces
57+
- repo: https://github.com/Lucas-C/pre-commit-hooks
58+
rev: v1.1.10
59+
hooks:
60+
- id: remove-tabs
61+
62+
# Suggested hook if you add a .clang-format file
63+
# - repo: https://github.com/pre-commit/mirrors-clang-format
64+
# rev: v13.0.0
65+
# hooks:
66+
# - id: clang-format

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ python_example
2121
[actions-wheels-link]: https://github.com/pybind/python_example/actions?query=workflow%3AWheels
2222
[actions-wheels-badge]: https://github.com/pybind/python_example/workflows/Wheels/badge.svg
2323
[travis-link]: https://travis-ci.org/pybind/python_example
24-
[travis-badge]: https://travis-ci.org/pybind/python_example.svg?branch=master&status=passed
24+
[travis-badge]: https://travis-ci.org/pybind/python_example.svg?branch=master&status=passed
2525
[appveyor-link]: https://ci.appveyor.com/project/wjakob/python-example
2626
<!-- TODO: get a real badge link for appveyor -->
2727
[appveyor-badge]: https://travis-ci.org/pybind/python_example.svg?branch=master&status=passed

‎docs/conf.py

+88-82
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
#
32
# python_example documentation build configuration file, created by
43
# sphinx-quickstart on Fri Feb 26 00:29:33 2016.
@@ -12,58 +11,58 @@
1211
# All configuration values have a default; values that are commented out
1312
# serve to show the default.
1413

15-
import sys
1614
import os
15+
import sys
1716

1817
# If extensions (or modules to document with autodoc) are in another directory,
1918
# add these directories to sys.path here. If the directory is relative to the
2019
# documentation root, use os.path.abspath to make it absolute, like shown here.
21-
#sys.path.insert(0, os.path.abspath('.'))
20+
# sys.path.insert(0, os.path.abspath('.'))
2221

2322
# -- General configuration ------------------------------------------------
2423

2524
# If your documentation needs a minimal Sphinx version, state it here.
26-
#needs_sphinx = '1.0'
25+
# needs_sphinx = '1.0'
2726

2827
# Add any Sphinx extension module names here, as strings. They can be
2928
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3029
# ones.
3130
extensions = [
32-
'sphinx.ext.autodoc',
33-
'sphinx.ext.intersphinx',
34-
'sphinx.ext.autosummary',
35-
'sphinx.ext.napoleon',
31+
"sphinx.ext.autodoc",
32+
"sphinx.ext.intersphinx",
33+
"sphinx.ext.autosummary",
34+
"sphinx.ext.napoleon",
3635
]
3736

3837
autosummary_generate = True
3938

4039
# Add any paths that contain templates here, relative to this directory.
41-
templates_path = ['_templates']
40+
templates_path = ["_templates"]
4241

4342
# The suffix(es) of source filenames.
4443
# You can specify multiple suffix as a list of string:
4544
# source_suffix = ['.rst', '.md']
46-
source_suffix = '.rst'
45+
source_suffix = ".rst"
4746

4847
# The encoding of source files.
49-
#source_encoding = 'utf-8-sig'
48+
# source_encoding = 'utf-8-sig'
5049

5150
# The master toctree document.
52-
master_doc = 'index'
51+
master_doc = "index"
5352

5453
# General information about the project.
55-
project = u'python_example'
56-
copyright = u'2016, Sylvain Corlay'
57-
author = u'Sylvain Corlay'
54+
project = "python_example"
55+
copyright = "2016, Sylvain Corlay"
56+
author = "Sylvain Corlay"
5857

5958
# The version info for the project you're documenting, acts as replacement for
6059
# |version| and |release|, also used in various other places throughout the
6160
# built documents.
6261
#
6362
# The short X.Y version.
64-
version = u'0.0.1'
63+
version = "0.0.1"
6564
# The full version, including alpha/beta/rc tags.
66-
release = u'0.0.1'
65+
release = "0.0.1"
6766

6867
# The language for content autogenerated by Sphinx. Refer to documentation
6968
# for a list of supported languages.
@@ -74,37 +73,37 @@
7473

7574
# There are two options for replacing |today|: either, you set today to some
7675
# non-false value, then it is used:
77-
#today = ''
76+
# today = ''
7877
# Else, today_fmt is used as the format for a strftime call.
79-
#today_fmt = '%B %d, %Y'
78+
# today_fmt = '%B %d, %Y'
8079

8180
# List of patterns, relative to source directory, that match files and
8281
# directories to ignore when looking for source files.
83-
exclude_patterns = ['_build']
82+
exclude_patterns = ["_build"]
8483

8584
# The reST default role (used for this markup: `text`) to use for all
8685
# documents.
87-
#default_role = None
86+
# default_role = None
8887

8988
# If true, '()' will be appended to :func: etc. cross-reference text.
90-
#add_function_parentheses = True
89+
# add_function_parentheses = True
9190

9291
# If true, the current module name will be prepended to all description
9392
# unit titles (such as .. function::).
94-
#add_module_names = True
93+
# add_module_names = True
9594

9695
# If true, sectionauthor and moduleauthor directives will be shown in the
9796
# output. They are ignored by default.
98-
#show_authors = False
97+
# show_authors = False
9998

10099
# The name of the Pygments (syntax highlighting) style to use.
101-
pygments_style = 'sphinx'
100+
pygments_style = "sphinx"
102101

103102
# A list of ignored prefixes for module index sorting.
104-
#modindex_common_prefix = []
103+
# modindex_common_prefix = []
105104

106105
# If true, keep warnings as "system message" paragraphs in the built documents.
107-
#keep_warnings = False
106+
# keep_warnings = False
108107

109108
# If true, `todo` and `todoList` produce output, else they produce nothing.
110109
todo_include_todos = False
@@ -114,156 +113,157 @@
114113

115114
# The theme to use for HTML and HTML Help pages. See the documentation for
116115
# a list of builtin themes.
117-
html_theme = 'alabaster'
116+
html_theme = "alabaster"
118117

119118
# Theme options are theme-specific and customize the look and feel of a theme
120119
# further. For a list of options available for each theme, see the
121120
# documentation.
122-
#html_theme_options = {}
121+
# html_theme_options = {}
123122

124123
# Add any paths that contain custom themes here, relative to this directory.
125-
#html_theme_path = []
124+
# html_theme_path = []
126125

127126
# The name for this set of Sphinx documents. If None, it defaults to
128127
# "<project> v<release> documentation".
129-
#html_title = None
128+
# html_title = None
130129

131130
# A shorter title for the navigation bar. Default is the same as html_title.
132-
#html_short_title = None
131+
# html_short_title = None
133132

134133
# The name of an image file (relative to this directory) to place at the top
135134
# of the sidebar.
136-
#html_logo = None
135+
# html_logo = None
137136

138137
# The name of an image file (within the static path) to use as favicon of the
139138
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
140139
# pixels large.
141-
#html_favicon = None
140+
# html_favicon = None
142141

143142
# Add any paths that contain custom static files (such as style sheets) here,
144143
# relative to this directory. They are copied after the builtin static files,
145144
# so a file named "default.css" will overwrite the builtin "default.css".
146-
html_static_path = ['_static']
145+
html_static_path = ["_static"]
147146

148147
# Add any extra paths that contain custom files (such as robots.txt or
149148
# .htaccess) here, relative to this directory. These files are copied
150149
# directly to the root of the documentation.
151-
#html_extra_path = []
150+
# html_extra_path = []
152151

153152
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
154153
# using the given strftime format.
155-
#html_last_updated_fmt = '%b %d, %Y'
154+
# html_last_updated_fmt = '%b %d, %Y'
156155

157156
# If true, SmartyPants will be used to convert quotes and dashes to
158157
# typographically correct entities.
159-
#html_use_smartypants = True
158+
# html_use_smartypants = True
160159

161160
# Custom sidebar templates, maps document names to template names.
162-
#html_sidebars = {}
161+
# html_sidebars = {}
163162

164163
# Additional templates that should be rendered to pages, maps page names to
165164
# template names.
166-
#html_additional_pages = {}
165+
# html_additional_pages = {}
167166

168167
# If false, no module index is generated.
169-
#html_domain_indices = True
168+
# html_domain_indices = True
170169

171170
# If false, no index is generated.
172-
#html_use_index = True
171+
# html_use_index = True
173172

174173
# If true, the index is split into individual pages for each letter.
175-
#html_split_index = False
174+
# html_split_index = False
176175

177176
# If true, links to the reST sources are added to the pages.
178-
#html_show_sourcelink = True
177+
# html_show_sourcelink = True
179178

180179
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
181-
#html_show_sphinx = True
180+
# html_show_sphinx = True
182181

183182
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
184-
#html_show_copyright = True
183+
# html_show_copyright = True
185184

186185
# If true, an OpenSearch description file will be output, and all pages will
187186
# contain a <link> tag referring to it. The value of this option must be the
188187
# base URL from which the finished HTML is served.
189-
#html_use_opensearch = ''
188+
# html_use_opensearch = ''
190189

191190
# This is the file name suffix for HTML files (e.g. ".xhtml").
192-
#html_file_suffix = None
191+
# html_file_suffix = None
193192

194193
# Language to be used for generating the HTML full-text search index.
195194
# Sphinx supports the following languages:
196195
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
197196
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
198-
#html_search_language = 'en'
197+
# html_search_language = 'en'
199198

200199
# A dictionary with options for the search language support, empty by default.
201200
# Now only 'ja' uses this config value
202-
#html_search_options = {'type': 'default'}
201+
# html_search_options = {'type': 'default'}
203202

204203
# The name of a javascript file (relative to the configuration directory) that
205204
# implements a search results scorer. If empty, the default will be used.
206-
#html_search_scorer = 'scorer.js'
205+
# html_search_scorer = 'scorer.js'
207206

208207
# Output file base name for HTML help builder.
209-
htmlhelp_basename = 'python_exampledoc'
208+
htmlhelp_basename = "python_exampledoc"
210209

211210
# -- Options for LaTeX output ---------------------------------------------
212211

213212
latex_elements = {
214-
# The paper size ('letterpaper' or 'a4paper').
215-
#'papersize': 'letterpaper',
216-
217-
# The font size ('10pt', '11pt' or '12pt').
218-
#'pointsize': '10pt',
219-
220-
# Additional stuff for the LaTeX preamble.
221-
#'preamble': '',
222-
223-
# Latex figure (float) alignment
224-
#'figure_align': 'htbp',
213+
# The paper size ('letterpaper' or 'a4paper').
214+
#'papersize': 'letterpaper',
215+
# The font size ('10pt', '11pt' or '12pt').
216+
#'pointsize': '10pt',
217+
# Additional stuff for the LaTeX preamble.
218+
#'preamble': '',
219+
# Latex figure (float) alignment
220+
#'figure_align': 'htbp',
225221
}
226222

227223
# Grouping the document tree into LaTeX files. List of tuples
228224
# (source start file, target name, title,
229225
# author, documentclass [howto, manual, or own class]).
230226
latex_documents = [
231-
(master_doc, 'python_example.tex', u'python_example Documentation',
232-
u'Sylvain Corlay', 'manual'),
227+
(
228+
master_doc,
229+
"python_example.tex",
230+
"python_example Documentation",
231+
"Sylvain Corlay",
232+
"manual",
233+
),
233234
]
234235

235236
# The name of an image file (relative to this directory) to place at the top of
236237
# the title page.
237-
#latex_logo = None
238+
# latex_logo = None
238239

239240
# For "manual" documents, if this is true, then toplevel headings are parts,
240241
# not chapters.
241-
#latex_use_parts = False
242+
# latex_use_parts = False
242243

243244
# If true, show page references after internal links.
244-
#latex_show_pagerefs = False
245+
# latex_show_pagerefs = False
245246

246247
# If true, show URL addresses after external links.
247-
#latex_show_urls = False
248+
# latex_show_urls = False
248249

249250
# Documents to append as an appendix to all manuals.
250-
#latex_appendices = []
251+
# latex_appendices = []
251252

252253
# If false, no module index is generated.
253-
#latex_domain_indices = True
254+
# latex_domain_indices = True
254255

255256

256257
# -- Options for manual page output ---------------------------------------
257258

258259
# One entry per manual page. List of tuples
259260
# (source start file, name, description, authors, manual section).
260261
man_pages = [
261-
(master_doc, 'python_example', u'python_example Documentation',
262-
[author], 1)
262+
(master_doc, "python_example", "python_example Documentation", [author], 1)
263263
]
264264

265265
# If true, show URL addresses after external links.
266-
#man_show_urls = False
266+
# man_show_urls = False
267267

268268

269269
# -- Options for Texinfo output -------------------------------------------
@@ -272,23 +272,29 @@
272272
# (source start file, target name, title, author,
273273
# dir menu entry, description, category)
274274
texinfo_documents = [
275-
(master_doc, 'python_example', u'python_example Documentation',
276-
author, 'python_example', 'One line description of project.',
277-
'Miscellaneous'),
275+
(
276+
master_doc,
277+
"python_example",
278+
"python_example Documentation",
279+
author,
280+
"python_example",
281+
"One line description of project.",
282+
"Miscellaneous",
283+
),
278284
]
279285

280286
# Documents to append as an appendix to all manuals.
281-
#texinfo_appendices = []
287+
# texinfo_appendices = []
282288

283289
# If false, no module index is generated.
284-
#texinfo_domain_indices = True
290+
# texinfo_domain_indices = True
285291

286292
# How to display URL addresses: 'footnote', 'no', or 'inline'.
287-
#texinfo_show_urls = 'footnote'
293+
# texinfo_show_urls = 'footnote'
288294

289295
# If true, do not generate a @detailmenu in the "Top" node's menu.
290-
#texinfo_no_detailmenu = False
296+
# texinfo_no_detailmenu = False
291297

292298

293299
# Example configuration for intersphinx: refer to the Python standard library.
294-
intersphinx_mapping = {'https://docs.python.org/': None}
300+
intersphinx_mapping = {"https://docs.python.org/": None}

‎docs/index.rst

-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ Contents:
77
:maxdepth: 2
88

99
python_example
10-

‎docs/make.bat

+155-155
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,48 @@
33
REM Command file for Sphinx documentation
44

55
if "%SPHINXBUILD%" == "" (
6-
set SPHINXBUILD=sphinx-build
6+
set SPHINXBUILD=sphinx-build
77
)
88
set BUILDDIR=_build
99
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
1010
set I18NSPHINXOPTS=%SPHINXOPTS% .
1111
if NOT "%PAPER%" == "" (
12-
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
13-
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
12+
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
13+
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
1414
)
1515

1616
if "%1" == "" goto help
1717

1818
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-
echo. coverage to run coverage check of the documentation if enabled
41-
goto end
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+
echo. coverage to run coverage check of the documentation if enabled
41+
goto end
4242
)
4343

4444
if "%1" == "clean" (
45-
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
46-
del /q /s %BUILDDIR%\*
47-
goto end
45+
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
46+
del /q /s %BUILDDIR%\*
47+
goto end
4848
)
4949

5050

@@ -58,206 +58,206 @@ goto sphinx_ok
5858
set SPHINXBUILD=python -m sphinx.__init__
5959
%SPHINXBUILD% 2> nul
6060
if errorlevel 9009 (
61-
echo.
62-
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
63-
echo.installed, then set the SPHINXBUILD environment variable to point
64-
echo.to the full path of the 'sphinx-build' executable. Alternatively you
65-
echo.may add the Sphinx directory to PATH.
66-
echo.
67-
echo.If you don't have Sphinx installed, grab it from
68-
echo.http://sphinx-doc.org/
69-
exit /b 1
61+
echo.
62+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
63+
echo.installed, then set the SPHINXBUILD environment variable to point
64+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
65+
echo.may add the Sphinx directory to PATH.
66+
echo.
67+
echo.If you don't have Sphinx installed, grab it from
68+
echo.http://sphinx-doc.org/
69+
exit /b 1
7070
)
7171

7272
:sphinx_ok
7373

7474

7575
if "%1" == "html" (
76-
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
77-
if errorlevel 1 exit /b 1
78-
echo.
79-
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
80-
goto end
76+
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
77+
if errorlevel 1 exit /b 1
78+
echo.
79+
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
80+
goto end
8181
)
8282

8383
if "%1" == "dirhtml" (
84-
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
85-
if errorlevel 1 exit /b 1
86-
echo.
87-
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
88-
goto end
84+
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
85+
if errorlevel 1 exit /b 1
86+
echo.
87+
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
88+
goto end
8989
)
9090

9191
if "%1" == "singlehtml" (
92-
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
93-
if errorlevel 1 exit /b 1
94-
echo.
95-
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
96-
goto end
92+
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
93+
if errorlevel 1 exit /b 1
94+
echo.
95+
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
96+
goto end
9797
)
9898

9999
if "%1" == "pickle" (
100-
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
101-
if errorlevel 1 exit /b 1
102-
echo.
103-
echo.Build finished; now you can process the pickle files.
104-
goto end
100+
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
101+
if errorlevel 1 exit /b 1
102+
echo.
103+
echo.Build finished; now you can process the pickle files.
104+
goto end
105105
)
106106

107107
if "%1" == "json" (
108-
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
109-
if errorlevel 1 exit /b 1
110-
echo.
111-
echo.Build finished; now you can process the JSON files.
112-
goto end
108+
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
109+
if errorlevel 1 exit /b 1
110+
echo.
111+
echo.Build finished; now you can process the JSON files.
112+
goto end
113113
)
114114

115115
if "%1" == "htmlhelp" (
116-
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
117-
if errorlevel 1 exit /b 1
118-
echo.
119-
echo.Build finished; now you can run HTML Help Workshop with the ^
116+
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
117+
if errorlevel 1 exit /b 1
118+
echo.
119+
echo.Build finished; now you can run HTML Help Workshop with the ^
120120
.hhp project file in %BUILDDIR%/htmlhelp.
121-
goto end
121+
goto end
122122
)
123123

124124
if "%1" == "qthelp" (
125-
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
126-
if errorlevel 1 exit /b 1
127-
echo.
128-
echo.Build finished; now you can run "qcollectiongenerator" with the ^
125+
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
126+
if errorlevel 1 exit /b 1
127+
echo.
128+
echo.Build finished; now you can run "qcollectiongenerator" with the ^
129129
.qhcp project file in %BUILDDIR%/qthelp, like this:
130-
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\python_example.qhcp
131-
echo.To view the help file:
132-
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\python_example.ghc
133-
goto end
130+
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\python_example.qhcp
131+
echo.To view the help file:
132+
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\python_example.ghc
133+
goto end
134134
)
135135

136136
if "%1" == "devhelp" (
137-
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
138-
if errorlevel 1 exit /b 1
139-
echo.
140-
echo.Build finished.
141-
goto end
137+
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
138+
if errorlevel 1 exit /b 1
139+
echo.
140+
echo.Build finished.
141+
goto end
142142
)
143143

144144
if "%1" == "epub" (
145-
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
146-
if errorlevel 1 exit /b 1
147-
echo.
148-
echo.Build finished. The epub file is in %BUILDDIR%/epub.
149-
goto end
145+
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
146+
if errorlevel 1 exit /b 1
147+
echo.
148+
echo.Build finished. The epub file is in %BUILDDIR%/epub.
149+
goto end
150150
)
151151

152152
if "%1" == "latex" (
153-
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
154-
if errorlevel 1 exit /b 1
155-
echo.
156-
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
157-
goto end
153+
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
154+
if errorlevel 1 exit /b 1
155+
echo.
156+
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
157+
goto end
158158
)
159159

160160
if "%1" == "latexpdf" (
161-
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
162-
cd %BUILDDIR%/latex
163-
make all-pdf
164-
cd %~dp0
165-
echo.
166-
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
167-
goto end
161+
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
162+
cd %BUILDDIR%/latex
163+
make all-pdf
164+
cd %~dp0
165+
echo.
166+
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
167+
goto end
168168
)
169169

170170
if "%1" == "latexpdfja" (
171-
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
172-
cd %BUILDDIR%/latex
173-
make all-pdf-ja
174-
cd %~dp0
175-
echo.
176-
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
177-
goto end
171+
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
172+
cd %BUILDDIR%/latex
173+
make all-pdf-ja
174+
cd %~dp0
175+
echo.
176+
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
177+
goto end
178178
)
179179

180180
if "%1" == "text" (
181-
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
182-
if errorlevel 1 exit /b 1
183-
echo.
184-
echo.Build finished. The text files are in %BUILDDIR%/text.
185-
goto end
181+
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
182+
if errorlevel 1 exit /b 1
183+
echo.
184+
echo.Build finished. The text files are in %BUILDDIR%/text.
185+
goto end
186186
)
187187

188188
if "%1" == "man" (
189-
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
190-
if errorlevel 1 exit /b 1
191-
echo.
192-
echo.Build finished. The manual pages are in %BUILDDIR%/man.
193-
goto end
189+
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
190+
if errorlevel 1 exit /b 1
191+
echo.
192+
echo.Build finished. The manual pages are in %BUILDDIR%/man.
193+
goto end
194194
)
195195

196196
if "%1" == "texinfo" (
197-
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
198-
if errorlevel 1 exit /b 1
199-
echo.
200-
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
201-
goto end
197+
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
198+
if errorlevel 1 exit /b 1
199+
echo.
200+
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
201+
goto end
202202
)
203203

204204
if "%1" == "gettext" (
205-
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
206-
if errorlevel 1 exit /b 1
207-
echo.
208-
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
209-
goto end
205+
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
206+
if errorlevel 1 exit /b 1
207+
echo.
208+
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
209+
goto end
210210
)
211211

212212
if "%1" == "changes" (
213-
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
214-
if errorlevel 1 exit /b 1
215-
echo.
216-
echo.The overview file is in %BUILDDIR%/changes.
217-
goto end
213+
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
214+
if errorlevel 1 exit /b 1
215+
echo.
216+
echo.The overview file is in %BUILDDIR%/changes.
217+
goto end
218218
)
219219

220220
if "%1" == "linkcheck" (
221-
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
222-
if errorlevel 1 exit /b 1
223-
echo.
224-
echo.Link check complete; look for any errors in the above output ^
221+
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
222+
if errorlevel 1 exit /b 1
223+
echo.
224+
echo.Link check complete; look for any errors in the above output ^
225225
or in %BUILDDIR%/linkcheck/output.txt.
226-
goto end
226+
goto end
227227
)
228228

229229
if "%1" == "doctest" (
230-
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
231-
if errorlevel 1 exit /b 1
232-
echo.
233-
echo.Testing of doctests in the sources finished, look at the ^
230+
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
231+
if errorlevel 1 exit /b 1
232+
echo.
233+
echo.Testing of doctests in the sources finished, look at the ^
234234
results in %BUILDDIR%/doctest/output.txt.
235-
goto end
235+
goto end
236236
)
237237

238238
if "%1" == "coverage" (
239-
%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
240-
if errorlevel 1 exit /b 1
241-
echo.
242-
echo.Testing of coverage in the sources finished, look at the ^
239+
%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
240+
if errorlevel 1 exit /b 1
241+
echo.
242+
echo.Testing of coverage in the sources finished, look at the ^
243243
results in %BUILDDIR%/coverage/python.txt.
244-
goto end
244+
goto end
245245
)
246246

247247
if "%1" == "xml" (
248-
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
249-
if errorlevel 1 exit /b 1
250-
echo.
251-
echo.Build finished. The XML files are in %BUILDDIR%/xml.
252-
goto end
248+
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
249+
if errorlevel 1 exit /b 1
250+
echo.
251+
echo.Build finished. The XML files are in %BUILDDIR%/xml.
252+
goto end
253253
)
254254

255255
if "%1" == "pseudoxml" (
256-
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
257-
if errorlevel 1 exit /b 1
258-
echo.
259-
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
260-
goto end
256+
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
257+
if errorlevel 1 exit /b 1
258+
echo.
259+
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
260+
goto end
261261
)
262262

263263
:end

‎setup.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
from setuptools import setup
1+
import sys
22

3+
from pybind11 import get_cmake_dir
34
# Available at setup time due to pyproject.toml
45
from pybind11.setup_helpers import Pybind11Extension, build_ext
5-
from pybind11 import get_cmake_dir
6-
7-
import sys
6+
from setuptools import setup
87

98
__version__ = "0.0.1"
109

0 commit comments

Comments
 (0)
Please sign in to comment.