Commit 3d4021b9 authored by Dominik Charousset's avatar Dominik Charousset

Fix setup for read-the-docs manual

parent 1e5342c7
...@@ -6,5 +6,9 @@ blog_release_note.md ...@@ -6,5 +6,9 @@ blog_release_note.md
build/* build/*
github_release_note.md github_release_note.md
html/* html/*
manual/examples
manual/html/* manual/html/*
manual/libcaf_core
manual/libcaf_io
manual/libcaf_openssl
release.txt release.txt
...@@ -142,7 +142,8 @@ A SNocs workspace is provided by GitHub user ...@@ -142,7 +142,8 @@ A SNocs workspace is provided by GitHub user
CAF uses [Sphinx](https://www.sphinx-doc.org): CAF uses [Sphinx](https://www.sphinx-doc.org):
```sh ```sh
sphinx-build . manual/html -c manual cd manual
sphinx-build . html
``` ```
## Scientific Use ## Scientific Use
......
...@@ -20,11 +20,16 @@ ...@@ -20,11 +20,16 @@
# import sys # import sys
# sys.path.insert(0, os.path.abspath('.')) # sys.path.insert(0, os.path.abspath('.'))
import os, sys, git, re import os, sys, git, re, pathlib
# -- CAF-specific variables ---------------------------------------------------
conf_dir = pathlib.Path(__file__).parent.absolute()
root_dir = conf_dir.parent.absolute()
# Fetch the CAF version. # Fetch the CAF version.
import re import re
with open("../libcaf_core/caf/config.hpp") as f: with open(os.path.join(root_dir, "libcaf_core/caf/config.hpp")) as f:
match = re.search('^#define CAF_VERSION ([0-9]+)$', f.read(), re.MULTILINE) match = re.search('^#define CAF_VERSION ([0-9]+)$', f.read(), re.MULTILINE)
if match == None: if match == None:
raise RuntimeError("unable to locate CAF_VERSION string in config.hpp") raise RuntimeError("unable to locate CAF_VERSION string in config.hpp")
...@@ -36,7 +41,7 @@ with open("../libcaf_core/caf/config.hpp") as f: ...@@ -36,7 +41,7 @@ with open("../libcaf_core/caf/config.hpp") as f:
# We're building a stable release if the last commit message is # We're building a stable release if the last commit message is
# "Change version to <version>". # "Change version to <version>".
repo = git.Repo(os.path.abspath('..')) repo = git.Repo(root_dir)
is_stable = repo.head.commit.message.startswith("Change version to " + version) is_stable = repo.head.commit.message.startswith("Change version to " + version)
# Generate the full version, including alpha/beta/rc tags. For stable releases, # Generate the full version, including alpha/beta/rc tags. For stable releases,
...@@ -48,7 +53,14 @@ else: ...@@ -48,7 +53,14 @@ else:
last_commit = last_commit_full[:7] last_commit = last_commit_full[:7]
release = version + "+exp.sha." + last_commit release = version + "+exp.sha." + last_commit
# -- General configuration ------------------------------------------------ # -- Enable Sphinx to find the literal includes -------------------------------
for dirname in ["examples", "libcaf_core", "libcaf_io", "libcaf_openssl"]:
dest_dir = os.path.join(conf_dir, dirname)
if not os.path.isdir(dest_dir):
os.symlink(os.path.join(root_dir, dirname), dest_dir)
# -- General configuration ----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here. # If your documentation needs a minimal Sphinx version, state it here.
# #
...@@ -75,7 +87,7 @@ source_suffix = '.rst' ...@@ -75,7 +87,7 @@ source_suffix = '.rst'
# source_encoding = 'utf-8-sig' # source_encoding = 'utf-8-sig'
# The master toctree document. # The master toctree document.
master_doc = 'manual' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'CAF' project = u'CAF'
......
...@@ -10,37 +10,37 @@ Contents ...@@ -10,37 +10,37 @@ Contents
:maxdepth: 2 :maxdepth: 2
:caption: Core Library :caption: Core Library
manual/Introduction Introduction
manual/Overview Overview
manual/TypeInspection TypeInspection
manual/MessageHandlers MessageHandlers
manual/Actors Actors
manual/MessagePassing MessagePassing
manual/Scheduler Scheduler
manual/Registry Registry
manual/ReferenceCounting ReferenceCounting
manual/Error Error
manual/ConfiguringActorApplications ConfiguringActorApplications
manual/Messages Messages
manual/GroupCommunication GroupCommunication
manual/ManagingGroupsOfWorkers ManagingGroupsOfWorkers
manual/Streaming Streaming
manual/Testing Testing
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
:caption: I/O Library :caption: I/O Library
manual/NetworkTransparency NetworkTransparency
manual/Brokers Brokers
manual/RemoteSpawn RemoteSpawn
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
:caption: Appendix :caption: Appendix
manual/FAQ FAQ
manual/Utility Utility
manual/CommonPitfalls CommonPitfalls
manual/UsingAout UsingAout
manual/MigrationGuides MigrationGuides
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment