version bump

This commit is contained in:
boyska 2020-04-23 16:11:02 +02:00
parent 50c7a5ca61
commit 964770f9b4
2 changed files with 89 additions and 95 deletions

View file

@ -14,9 +14,10 @@
# serve to show the default.
from __future__ import print_function
import sys
import os
import subprocess
import sys
from sphinx.util.console import red
@ -33,36 +34,32 @@ from sphinx.util.console import red
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
]
extensions = ["sphinx.ext.autodoc", "sphinx.ext.coverage", "sphinx.ext.viewcode"]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]
# The suffix of source filenames.
source_suffix = '.rst'
source_suffix = ".rst"
# The encoding of source files.
# source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
master_doc = "index"
# General information about the project.
project = 'larigira'
copyright = '2015-2017, boyska'
project = "larigira"
copyright = "2015-2017, boyska"
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.3'
version = "1.3"
# The full version, including alpha/beta/rc tags.
release = '1.3.1'
release = "1.3.2"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -94,7 +91,7 @@ exclude_patterns = []
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
@ -107,7 +104,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme = "default"
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@ -136,7 +133,7 @@ html_theme = 'default'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
@ -185,7 +182,7 @@ html_static_path = ['_static']
# html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'larigiradoc'
htmlhelp_basename = "larigiradoc"
# -- Options for LaTeX output ---------------------------------------------
@ -193,10 +190,8 @@ htmlhelp_basename = 'larigiradoc'
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
@ -205,8 +200,7 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'larigira.tex', 'larigira Documentation',
'boyska', 'manual'),
("index", "larigira.tex", "larigira Documentation", "boyska", "manual")
]
# The name of an image file (relative to this directory) to place at the top of
@ -234,10 +228,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'larigira', 'larigira Documentation',
['boyska'], 1)
]
man_pages = [("index", "larigira", "larigira Documentation", ["boyska"], 1)]
# If true, show URL addresses after external links.
# man_show_urls = False
@ -249,9 +240,15 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'larigira', 'larigira Documentation',
'boyska', 'larigira', 'One line description of project.',
'Miscellaneous'),
(
"index",
"larigira",
"larigira Documentation",
"boyska",
"larigira",
"One line description of project.",
"Miscellaneous",
)
]
# Documents to append as an appendix to all manuals.
@ -269,32 +266,29 @@ texinfo_documents = [
def run_apidoc(_):
cur_dir = os.path.abspath(os.path.dirname(__file__))
proj_dir = os.path.abspath(os.path.join(cur_dir, '..', '..'))
modules = ['larigira']
exclude_files = [os.path.abspath(os.path.join(proj_dir, excl))
for excl in ('larigira/rpc.py', 'larigira/dbadmin/')]
output_path = os.path.join(cur_dir, 'api')
cmd_path = 'sphinx-apidoc'
if hasattr(sys, 'real_prefix'): # Are we in a virtualenv?
proj_dir = os.path.abspath(os.path.join(cur_dir, "..", ".."))
modules = ["larigira"]
exclude_files = [
os.path.abspath(os.path.join(proj_dir, excl))
for excl in ("larigira/rpc.py", "larigira/dbadmin/")
]
output_path = os.path.join(cur_dir, "api")
cmd_path = "sphinx-apidoc"
if hasattr(sys, "real_prefix"): # Are we in a virtualenv?
# assemble the path manually
cmd_path = os.path.abspath(os.path.join(sys.prefix,
'bin',
'sphinx-apidoc'))
cmd_path = os.path.abspath(os.path.join(sys.prefix, "bin", "sphinx-apidoc"))
if not os.path.exists(cmd_path):
print(red("No apidoc available!"), file=sys.stderr)
return
for module in modules:
try:
subprocess.check_call([cmd_path,
'--force',
'-o', output_path,
module
] + exclude_files,
cwd=proj_dir
subprocess.check_call(
[cmd_path, "--force", "-o", output_path, module] + exclude_files,
cwd=proj_dir,
)
except subprocess.CalledProcessError:
print(red("APIdoc failed for module {}".format(module)))
def setup(app):
app.connect('builder-inited', run_apidoc)
app.connect("builder-inited", run_apidoc)

View file

@ -32,7 +32,7 @@ class PyTest(TestCommand):
setup(
name="larigira",
version="1.3.1",
version="1.3.2",
description="A radio automation based on MPD",
long_description=read("README.rst"),
long_description_content_type="text/x-rst",