Skip to content

Commit e9b11a7

Browse files
Martin Belangerigaw
authored andcommitted
docs: Fix read-the-docs
Allow Read-the-Docs web site to be able to build the docs. Signed-off-by: Martin Belanger <[email protected]>
1 parent 8504b6a commit e9b11a7

File tree

7 files changed

+18
-22
lines changed

7 files changed

+18
-22
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ build:
1616
post_install:
1717
- pip3 install lxml
1818
pre_build:
19-
- meson setup .build -Ddocs=rst -Ddocs-build=true || cat .build/meson-logs/meson-log.txt
19+
- meson setup .build -Ddocs=rst -Ddocs-build=true -Dnvme=disabled -Dlibnvme=disabled -Dpython=disabled || cat .build/meson-logs/meson-log.txt
2020
- meson compile -C .build
2121

2222
sphinx:
23-
configuration: .build/doc/conf.py
23+
configuration: .build/libnvme/doc/conf.py

Documentation/meson.build

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,11 @@ adoc_includes = [
265265
'cmds-main.txt',
266266
]
267267

268-
want_docs = get_option('docs')
269-
want_docs_build = get_option('docs-build')
270268
if want_docs != 'false'
271269
mandir = join_paths(get_option('mandir'), 'man1')
272270
htmldir = join_paths(get_option('htmldir'), 'nvme')
273271

274-
asciidoctor = find_program('asciidoc', required: get_option('docs-build'))
272+
asciidoctor = find_program('asciidoc', required: want_docs_build)
275273
if want_docs_build and asciidoctor.found()
276274
# Build documentation before installing
277275
foreach file : adoc_includes

libnvme/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# libnvme
22

3-
![PyBuild](https://github.com/linux-nvme/nvme-cli/actions/workflows/release-python.yml/badge.svg)
3+
![PyBuild](https://github.com/linux-nvme/nvme-cli/actions/workflows/libnvme-release-python.yml/badge.svg)
44
[![PyPI](https://img.shields.io/pypi/v/libnvme)](https://pypi.org/project/libnvme/)
55
[![PyPI - Wheel](https://img.shields.io/pypi/wheel/libnvme)](https://pypi.org/project/libnvme/)
66
[![codecov](https://codecov.io/gh/linux-nvme/nvme-cli/branch/master/graph/badge.svg)](https://codecov.io/gh/linux-nvme/nvme-cli)

libnvme/doc/meson.build

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ subdir('rst')
4949

5050
top_source_dir = meson.current_source_dir() + '/../'
5151

52-
want_docs = get_option('docs')
53-
want_docs_build = get_option('docs-build')
5452
kernel_doc = find_program(top_source_dir + 'scripts/kernel-doc')
5553
kernel_doc_check = find_program(top_source_dir +'scripts/kernel-doc-check')
5654

libnvme/doc/rst/meson.build

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
top_source_dir = meson.current_source_dir() + '/../../'
2-
3-
want_docs = get_option('docs')
4-
51
if want_docs != 'false'
6-
want_docs_build = get_option('docs-build')
7-
rstdir = get_option('rstdir')
82
if want_docs_build
9-
kernel_doc = find_program(top_source_dir + 'scripts/kernel-doc')
10-
11-
rst_conf = configuration_data()
12-
rst_conf.set('SYSCONFDIR', sysconfdir)
13-
143
if want_docs == 'all' or want_docs == 'rst' or want_docs == 'html'
4+
top_source_dir = meson.current_source_dir() + '/../../'
5+
kernel_doc = find_program(top_source_dir + 'scripts/kernel-doc')
6+
rst_conf = configuration_data(
7+
{
8+
'SYSCONFDIR' : sysconfdir,
9+
}
10+
)
11+
rstdir = get_option('rstdir')
1512
foreach apif : api_files
1613
afile = files(top_source_dir + 'src/nvme/' + apif)
1714
subst = configure_file(

libnvme/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ if want_libnvme
3838
if get_option('examples')
3939
subdir('examples')
4040
endif
41-
subdir('doc')
4241
else
4342
# Fallback to using a pre-installed libnvme (if available)
4443
if std_prefix
@@ -60,3 +59,4 @@ else
6059
endif
6160
endif
6261

62+
subdir('doc')

meson.build

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ cxx_available = add_languages('cpp', required: false, native: false)
5151
# dependencies are present. Also, -Dpython=enabled forces -Dlibnvme=enabled.
5252
want_nvme = get_option('nvme').disabled() == false
5353
want_libnvme = get_option('libnvme').disabled() == false
54+
want_docs = get_option('docs')
55+
want_docs_build = get_option('docs-build')
5456

5557
feature_python = get_option('python')
5658
if feature_python.disabled()
@@ -561,10 +563,10 @@ if want_nvme
561563
if get_option('nvme-tests')
562564
subdir('tests')
563565
endif
564-
565-
subdir('Documentation')
566566
endif
567567

568+
subdir('Documentation')
569+
568570

569571
################################################################################
570572
install_data(
@@ -606,6 +608,7 @@ wanted_dict = {
606608
'nvme': want_nvme,
607609
'libnvme': want_libnvme,
608610
'python bindings ': want_python,
611+
'build docs': want_docs_build,
609612
}
610613
summary(wanted_dict, section: 'Features to build', bool_yn: true)
611614

0 commit comments

Comments
 (0)