Add readthedocs config yaml and use version in conf.py

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
Hiroshi Miura
2021-09-04 02:00:00 +09:00
parent 6d63513628
commit eee3acaed7
4 changed files with 26 additions and 4 deletions

19
.readthedocs.yml Normal file
View File

@@ -0,0 +1,19 @@
version: 2
sphinx:
configuration: docs/conf.py
formats:
- epub
- pdf
python:
version: 3.7
install:
- method: setuptools
path: .
- method: pip
path: .
extra_requirements:
- docs
system_packages: false

View File

@@ -16,6 +16,7 @@ recursive-include tests *.py
recursive-include tests *.xml
prune .github
exclude .gitignore
exclude .readthedocs.yml
exclude azure-pipelines.yml
exclude qtaccount.ini
exclude aqtinstall.log

View File

@@ -21,6 +21,8 @@ import os
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('..'))
import aqt.version
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
@@ -60,10 +62,10 @@ author = u'Hiroshi Miura'
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'1.0'
# The full version, including alpha/beta/rc tags.
release = u'1.0.0b2'
release = aqt.version.__version__
# The short X.Y version.
version = '.'.join(release.split('.')[:2])
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
local_scheme = "no-local-version"
[tool.check-manifest]
ignore = ["aqt/version.py","azure-pipelines.yml","ci/*"]
ignore = ["aqt/version.py","azure-pipelines.yml", ".readthedocs.yml", "ci/*"]
[tool.coverage.run]
branch = true