Commit graph

4 commits

Author SHA1 Message Date
Nazar Kazakov f483b1bc4c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-18 13:24:08 -04:00
Martí Bolívar 9464798068 doc: external_content: fix for Unix
Path.rename() uses os.rename() internally. Per the Python docs:

     The operation may fail on some Unix flavors if src and dst are on
     different filesystems.

Since 'src_adjusted' is in a temporary directory, on my flavor of
Unix, that's in /tmp, which is indeed on a different filesystem than
'dst', a destination in the doc build directory on my root filesystem.

This is causing the following error when I build the docs:

Handler <function sync_contents at 0x7f9b8fca9c10> for event
'builder-inited' threw an exception (exception: [Errno 18] Invalid
cross-device link: '/tmp/tmpfscfo20o/index.rst' ->
'/home/mbolivar/zp/zephyr/doc/_build/src/reference/drivers/index.rst')

Fix this by using shutil.move() instead of Path.rename(). The shutil
function handles cross-filesystem moves correctly. It did not take a
path-like object for both its src and dst arguments until Python 3.9,
though, so we need to convert to strings for portability on earlier
but still supported versions.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-28 07:00:52 -05:00
Gerard Marull-Paretas de3c086429 doc: extensions: external_content: only ignore absolute paths
When including other rst files (via .. include::) the existence of the
included file may depend on when the _adjust routine is called, so only
ignore absolute paths.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-25 16:14:31 -05:00
Gerard Marull-Paretas cc2f29a656 doc: extensions: initial version of external_content
external_content extension allows to gather content from arbitrary
locations.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-25 19:38:11 +02:00