Skip to content

Commit 79b0e2c

Browse files
authored
docs: fix pdf build, simpler start page (#2736)
1 parent 6b4297f commit 79b0e2c

File tree

4 files changed

+32
-22
lines changed

4 files changed

+32
-22
lines changed

README.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
• `Scikit-build example <https://github.com/pybind/scikit_build_example>`_
1212
• `CMake example <https://github.com/pybind/cmake_example>`_
1313

14+
.. start
15+
1416
.. warning::
1517

1618
Combining older versions of pybind11 (< 2.6.0) with Python 3.9.0 will
@@ -24,6 +26,7 @@
2426
the latest version of pybind11 (2.6.0 or newer), which includes a temporary
2527
workaround specifically when Python 3.9.0 is detected at runtime.
2628

29+
2730
**pybind11** is a lightweight header-only library that exposes C++ types
2831
in Python and vice versa, mainly to create Python bindings of existing
2932
C++ code. Its goals and syntax are similar to the excellent
@@ -171,19 +174,19 @@ to the terms and conditions of this license.
171174

172175
.. |Latest Documentation Status| image:: https://readthedocs.org/projects/pybind11/badge?version=latest
173176
:target: http://pybind11.readthedocs.org/en/latest
174-
.. |Stable Documentation Status| image:: https://img.shields.io/badge/docs-stable-blue
177+
.. |Stable Documentation Status| image:: https://img.shields.io/badge/docs-stable-blue.svg
175178
:target: http://pybind11.readthedocs.org/en/stable
176179
.. |Gitter chat| image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg
177180
:target: https://gitter.im/pybind/Lobby
178181
.. |CI| image:: https://github.com/pybind/pybind11/workflows/CI/badge.svg
179182
:target: https://github.com/pybind/pybind11/actions
180183
.. |Build status| image:: https://ci.appveyor.com/api/projects/status/riaj54pn4h08xy40?svg=true
181184
:target: https://ci.appveyor.com/project/wjakob/pybind11
182-
.. |PyPI package| image:: https://img.shields.io/pypi/v/pybind11
185+
.. |PyPI package| image:: https://img.shields.io/pypi/v/pybind11.svg
183186
:target: https://pypi.org/project/pybind11/
184-
.. |Conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pybind11
187+
.. |Conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pybind11.svg
185188
:target: https://github.com/conda-forge/pybind11-feedstock
186189
.. |Repology| image:: https://repology.org/badge/latest-versions/python:pybind11.svg
187190
:target: https://repology.org/project/python:pybind11/versions
188-
.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/pybind11
191+
.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/pybind11.svg
189192
:target: https://pypi.org/project/pybind11/

docs/changelog.rst

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,31 @@ v2.6.2 (TBA, not yet released)
1111
------------------------------
1212

1313

14-
* Fixed segfault in multithreaded environments when using ``scoped_ostream_redirect``.
15-
`#2675 <https://github.com/pybind/pybind11/pull/2675>`_
16-
17-
* CMake: mixing local and installed pybind11's would prioritize the installed one over the local one (regression in 2.6.0).
18-
`#2716 <https://github.com/pybind/pybind11/pull/2716>`_
14+
* Allow thread termination to be avoided during shutdown for CPython 3.7+ via
15+
``.disarm``.
16+
`#2657 <https://github.com/pybind/pybind11/pull/2657>`_
1917

20-
* Fix bug where the constructor of `object` subclasses would not throw on being passed a Python object of the wrong type.
18+
* Fix bug where the constructor of ``object`` subclasses would not throw on
19+
being passed a Python object of the wrong type.
2120
`#2701 <https://github.com/pybind/pybind11/pull/2701>`_
2221

23-
* Fixed assertion error related to unhandled (later overwritten) exception in CPython 3.8 and 3.9 debug builds.
22+
* Fixed segfault in multithreaded environments when using
23+
``scoped_ostream_redirect``.
24+
`#2675 <https://github.com/pybind/pybind11/pull/2675>`_
25+
26+
* Fixed assertion error related to unhandled (later overwritten) exception in
27+
CPython 3.8 and 3.9 debug builds.
2428
`#2685 <https://github.com/pybind/pybind11/pull/2685>`_
2529

2630
* Fix ``py::gil_scoped_acquire`` assert with CPython 3.9 debug build.
2731
`#2683 <https://github.com/pybind/pybind11/pull/2683>`_
2832

29-
* Fixes segfaults in multithreaded environments when using ``scoped_ostream_redirect``.
30-
`#2675 <https://github.com/pybind/pybind11/pull/2675>`_
31-
32-
* Fix issue with FindPython2/FindPython3 not working with ``pybind11::embed``.
33+
* CMake: Fix issue with FindPython2/FindPython3 not working with ``pybind11::embed``.
3334
`#2662 <https://github.com/pybind/pybind11/pull/2662>`_
3435

35-
* Allow thread termination to be avoided during shutdown for CPython 3.7+ via ``.disarm``.
36-
`#2657 <https://github.com/pybind/pybind11/pull/2657>`_
36+
* CMake: mixing local and installed pybind11's would prioritize the installed
37+
one over the local one (regression in 2.6.0).
38+
`#2716 <https://github.com/pybind/pybind11/pull/2716>`_
3739

3840

3941

docs/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@
239239

240240
# -- Options for LaTeX output ---------------------------------------------
241241

242+
latex_engine = "pdflatex"
243+
242244
latex_elements = {
243245
# The paper size ('letterpaper' or 'a4paper').
244246
# 'papersize': 'letterpaper',
@@ -353,8 +355,11 @@ def prepare(app):
353355
with open(DIR.parent / "README.rst") as f:
354356
contents = f.read()
355357

356-
# Filter out section titles for index.rst for LaTeX
357358
if app.builder.name == "latex":
359+
# Remove badges and stuff from start
360+
contents = contents[contents.find(r".. start") :]
361+
362+
# Filter out section titles for index.rst for LaTeX
358363
contents = re.sub(r"^(.*)\n[-~]{3,}$", r"**\1**", contents, flags=re.MULTILINE)
359364

360365
with open(DIR / "readme.rst", "w") as f:

docs/requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
breathe==4.20.0
1+
breathe==4.25.1
22
commonmark==0.9.1
3-
recommonmark==0.6.0
4-
sphinx==3.2.1
3+
recommonmark==0.7.1
4+
sphinx==3.3.1
55
sphinx_rtd_theme==0.5.0
6-
sphinxcontrib-moderncmakedomain==3.13
6+
sphinxcontrib-moderncmakedomain==3.17
77
sphinxcontrib-svg2pdfconverter==1.1.0

0 commit comments

Comments
 (0)