Skip to content

Commit

Permalink
Fixed build docs on 'Read the Docs'
Browse files Browse the repository at this point in the history
  • Loading branch information
ekorneechev committed Nov 29, 2023
1 parent deb0f9d commit b288822
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Read the Docs configuration file

# Copyright (C) 2014-2024 Evgeniy Korneechev <ek@myconnector.ru>

# This program is free software; you can redistribute it and/or
# modify it under the terms of the version 2 of the GNU General
# Public License as published by the Free Software Foundation.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.

version: 2

build:
os: ubuntu-22.04
tools:
python: "3.10"

sphinx:
configuration: docs/conf.py

python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,4 @@ remove:
installdocs:
mkdir -p $(DOCS)
cp -r docs/* $(DOCS)
rm -f $(DOCS)/conf.py $(DOCS)/requirements.txt
1 change: 1 addition & 0 deletions deb/buildDeb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ TARGET=$TARGET-docs
DOCS=$TARGET/usr/share/doc/$TARGET-$(cat ../VERSION 2>/dev/null)
mkdir -p $DOCS
cp -r ../docs/* $DOCS
rm -f $DOCS/conf.py $DOCS/requirements.txt
INST_SIZE=`du -s myconnector-docs | cut -f 1`
mkdir -p $TARGET/DEBIAN
cd $TARGET
Expand Down
43 changes: 43 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Configuration file for the Sphinx documentation builder.
#
# Copyright (C) 2014-2024 Evgeniy Korneechev <ek@myconnector.ru>

# This program is free software; you can redistribute it and/or
# modify it under the terms of the version 2 of the GNU General
# Public License as published by the Free Software Foundation.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.

project = "MyConnector"
copyright = "2014-2024, Evgeniy Korneechev <ek@myconnector.ru>"
author = "Evgeniy Korneechev"

extensions = [
"sphinx.ext.duration",
"sphinx.ext.doctest",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
]

intersphinx_mapping = {
"rtd": ("https://docs.readthedocs.io/en/stable/", None),
"python": ("https://docs.python.org/3/", None),
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),
}

intersphinx_disabled_domains = ["std"]

templates_path = ["_templates"]

epub_show_urls = "footnote"

html_theme = "sphinx_rtd_theme"

html_static_path = ["_static"]
18 changes: 18 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Requirements for the Sphinx documentation builder.

# Copyright (C) 2014-2024 Evgeniy Korneechev <ek@myconnector.ru>

# This program is free software; you can redistribute it and/or
# modify it under the terms of the version 2 of the GNU General
# Public License as published by the Free Software Foundation.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.

sphinx==5.0.2
sphinx-rtd-theme==1.0.0
1 change: 1 addition & 0 deletions myconnector.spec
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ install -pm755 kiosk/*.desktop %buildroot%basedir/kiosk
install -pDm600 kiosk/kiosk.conf %buildroot%_sysconfdir/%name/kiosk.conf
install -pDm644 myconnector.conf %buildroot%_sysconfdir/%name/%name.conf
install -pDm644 %name.bashcomp %buildroot%_datadir/bash-completion/completions/%name
rm -f docs/conf.py docs/requirements.txt
mkdir -p %buildroot%xdgdir
cat > %buildroot%xdgdir/myconnector.desktop << EOF
[Desktop Entry]
Expand Down
20 changes: 20 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Read the Docs configuration file used by packaging tools

# Copyright (C) 2014-2024 Evgeniy Korneechev <ek@myconnector.ru>

# This program is free software; you can redistribute it and/or
# modify it under the terms of the version 2 of the GNU General
# Public License as published by the Free Software Foundation.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.

[project]
name = "myconnector"
authors = [{name = "Evgeniy Korneechev", email = "ek@myconnector.ru"}]
dynamic = ["version"]

0 comments on commit b288822

Please sign in to comment.