diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | MANIFEST.in | 2 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | doc/conf.py | 39 | ||||
-rwxr-xr-x | doc/generate/pkgcheck/checks.py | 4 | ||||
-rw-r--r-- | pyproject.toml | 7 |
6 files changed, 15 insertions, 40 deletions
@@ -14,3 +14,4 @@ _trial_temp /doc/_build /doc/api /doc/generated +/doc/man/pkgcheck diff --git a/MANIFEST.in b/MANIFEST.in index 5784287b..15fbcc7a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,6 +4,8 @@ recursive-include bin * recursive-include contrib * recursive-include data * recursive-include doc * +recursive-exclude doc/generated * +recursive-exclude doc/man/pkgcheck * recursive-include requirements * recursive-include src * recursive-include testdata * @@ -11,4 +11,4 @@ sdist wheel: .PHONY: clean clean: - $(RM) -r build/sphinx doc/api doc/generated dist + $(RM) -r build doc/man/pkgcheck doc/generated dist diff --git a/doc/conf.py b/doc/conf.py index 6917f395..440c6603 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -13,20 +13,6 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import os -import sys -from importlib import import_module - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -libdir = os.path.abspath(os.path.join('..', 'build', 'lib')) -if os.path.exists(libdir): - sys.path.insert(0, libdir) - -os.environ['PKGDIST_REPODIR'] = os.path.abspath('..') -from snakeoil.dist import distutils_extensions as pkgdist - # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. @@ -46,6 +32,7 @@ extensions = [ 'sphinx.ext.coverage', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', + 'snakeoil.dist.sphinxext', ] # Add any paths that contain templates here, relative to this directory. @@ -61,17 +48,11 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = pkgdist.MODULE_NAME +project = 'pkgcheck' authors = '' -copyright = '2006-2021, pkgcheck contributors' +copyright = '2006-2022, pkgcheck contributors' -# 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 = pkgdist.module_version() -# The full version, including alpha/beta/rc tags. +# version is set by snakeoil extension release = 'master' # The language for content autogenerated by Sphinx. Refer to documentation @@ -241,19 +222,9 @@ latex_documents = [ # -- Options for manual page output --------------------------------------- -bin_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'bin') -scripts = os.listdir(bin_path) - -generated_man_pages = [ - (f"{project}.scripts.{s.replace('-', '_')}", s) for s in scripts -] - # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [ - (f'man/{script}', script, import_module(module).__doc__.strip().split('\n', 1)[0], [], 1) - for module, script in generated_man_pages -] +man_pages = [] # If true, show URL addresses after external links. #man_show_urls = False diff --git a/doc/generate/pkgcheck/checks.py b/doc/generate/pkgcheck/checks.py index 04ff7289..e8401079 100755 --- a/doc/generate/pkgcheck/checks.py +++ b/doc/generate/pkgcheck/checks.py @@ -40,7 +40,7 @@ def main(f=sys.stdout, **kwargs): wrapper = TextWrapper(width=85) - for i, scope in enumerate(base.scopes.values()): + for scope in base.scopes.values(): _rst_header('-', scope.desc.capitalize() + ' scope') checks = (x for x in objects.CHECKS.values() if x.scope == scope) @@ -61,7 +61,7 @@ def main(f=sys.stdout, **kwargs): explanation = '\n'.join(dedent(explanation).strip().split('\n')) out('\n' + explanation) if issubclass(check, GentooRepoCheck): - out(f'\n\n- Gentoo repo specific') + out('\n\n- Gentoo repo specific') known_results = ', '.join( f'`{r.__name__}`_' for r in sorted(check.known_results, key=attrgetter('__name__'))) diff --git a/pyproject.toml b/pyproject.toml index 2f0ac255..bb6410bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ requires = [ "lxml", "pathspec", "tree-sitter>=0.19.0", - "snakeoil~=0.10.2", + "snakeoil~=0.10.3", "pkgcore~=0.12.17", ] build-backend = "setuptools.build_meta" @@ -40,7 +40,7 @@ dependencies = [ "lxml", "pathspec", "tree-sitter>=0.19.0", - "snakeoil~=0.10.2", + "snakeoil~=0.10.3", "pkgcore~=0.12.17", ] @@ -52,7 +52,8 @@ test = [ ] doc = [ "sphinx", - "tomli; python_version < '3.11'" + "tomli; python_version < '3.11'", + "snakeoil~=0.10.3", ] network = [ "requests", |