Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
0b9acc40
Unverified
Commit
0b9acc40
authored
Oct 18, 2020
by
Henry Schreiner
Committed by
GitHub
Oct 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: chapters in PDF again (#2606)
* fix: chapters in PDF again * fix: sections in README
parent
bed9080c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
4 deletions
+32
-4
README.rst
+3
-2
docs/conf.py
+28
-1
docs/index.rst
+1
-1
No files found.
README.rst
View file @
0b9acc40
.. figure:: https://github.com/pybind/pybind11/raw/master/docs/pybind11-logo.png
.. figure:: https://github.com/pybind/pybind11/raw/master/docs/pybind11-logo.png
:alt: pybind11 logo
:alt: pybind11 logo
pybind11 — Seamless operability between C++11 and Python
**pybind11 — Seamless operability between C++11 and Python**
========================================================
|Latest Documentation Status| |Stable Documentation Status| |Gitter chat| |CI| |Build status|
|Latest Documentation Status| |Stable Documentation Status| |Gitter chat| |CI| |Build status|
...
@@ -53,9 +52,11 @@ A PDF version of the manual is available
...
@@ -53,9 +52,11 @@ A PDF version of the manual is available
And the source code is always available at
And the source code is always available at
`github.com/pybind/pybind11 <https://github.com/pybind/pybind11>`_.
`github.com/pybind/pybind11 <https://github.com/pybind/pybind11>`_.
Core features
Core features
-------------
-------------
pybind11 can map the following core C++ features to Python:
pybind11 can map the following core C++ features to Python:
- Functions accepting and returning custom data structures per value,
- Functions accepting and returning custom data structures per value,
...
...
docs/conf.py
View file @
0b9acc40
...
@@ -17,6 +17,10 @@ import sys
...
@@ -17,6 +17,10 @@ import sys
import
os
import
os
import
shlex
import
shlex
import
subprocess
import
subprocess
from
pathlib
import
Path
import
re
DIR
=
Path
(
__file__
)
.
parent
.
resolve
()
# If extensions (or modules to document with autodoc) are in another directory,
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# add these directories to sys.path here. If the directory is relative to the
...
@@ -345,6 +349,29 @@ def generate_doxygen_xml(app):
...
@@ -345,6 +349,29 @@ def generate_doxygen_xml(app):
sys
.
stderr
.
write
(
"doxygen execution failed: {}
\n
"
.
format
(
e
))
sys
.
stderr
.
write
(
"doxygen execution failed: {}
\n
"
.
format
(
e
))
def
prepare
(
app
):
with
open
(
DIR
.
parent
/
"README.rst"
)
as
f
:
contents
=
f
.
read
()
# Filter out section titles for index.rst for LaTeX
if
app
.
builder
.
name
==
"latex"
:
contents
=
re
.
sub
(
r"^(.*)\n[-~]{3,}$"
,
r"**\1**"
,
contents
,
flags
=
re
.
MULTILINE
)
with
open
(
DIR
/
"readme.rst"
,
"w"
)
as
f
:
f
.
write
(
contents
)
def
clean_up
(
app
,
exception
):
(
DIR
/
"readme.rst"
)
.
unlink
()
def
setup
(
app
):
def
setup
(
app
):
"""Add hook for building doxygen xml when needed"""
# Add hook for building doxygen xml when needed
app
.
connect
(
"builder-inited"
,
generate_doxygen_xml
)
app
.
connect
(
"builder-inited"
,
generate_doxygen_xml
)
# Copy the readme in
app
.
connect
(
"builder-inited"
,
prepare
)
# Clean up the generated readme
app
.
connect
(
"build-finished"
,
clean_up
)
docs/index.rst
View file @
0b9acc40
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
Intro
Intro
=====
=====
.. include::
../README
.rst
.. include::
readme
.rst
.. only:: not latex
.. only:: not latex
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment