From 2c440f21b7445c0bcc30999ca33164391b0af800 Mon Sep 17 00:00:00 2001 From: liquor <1692257904@qq.com> Date: Mon, 21 Sep 2020 15:38:00 +0800 Subject: [PATCH] Spec file and updated building documentation --- ...e-and-updated-building-documentation.patch | 898 ++++++++++++++++++ libcomps.spec | 10 +- 2 files changed, 907 insertions(+), 1 deletion(-) create mode 100644 Spec-file-and-updated-building-documentation.patch diff --git a/Spec-file-and-updated-building-documentation.patch b/Spec-file-and-updated-building-documentation.patch new file mode 100644 index 0000000..fb343f2 --- /dev/null +++ b/Spec-file-and-updated-building-documentation.patch @@ -0,0 +1,898 @@ +From d45df99bbcce75dda845fbdd5cf86d66a8ed0f53 Mon Sep 17 00:00:00 2001 +From: Marek Blaha +Date: Wed, 20 Feb 2019 16:57:25 +0100 +Subject: [PATCH] Spec file and updated building documentation + +--- + README.md | 39 ++-- + build_prep.cmake | 1 - + build_prep.py | 164 --------------- + libcomps.spec | 186 +++++++++++++++++ + libcomps.spec.in | 156 -------------- + libcomps/src/python/docs/doc-sources/conf.py | 265 ------------------------ + libcomps/src/python/docs/doc-sources/conf.py.in | 2 +- + 7 files changed, 204 insertions(+), 609 deletions(-) + delete mode 100755 build_prep.py + create mode 100644 libcomps.spec + delete mode 100644 libcomps.spec.in + delete mode 100644 libcomps/src/python/docs/doc-sources/conf.py + +diff --git a/README.md b/README.md +index 23a0e3f..9362de7 100644 +--- a/README.md ++++ b/README.md +@@ -32,35 +32,30 @@ for documentation build: + + * doxygen http://www.stack.nl/~dimitri/doxygen/ + ++for rpm building: ++ ++* tito https://github.com/dgoodwin/tito ++ + + ### Building + 1. clone this repository + git clone https://github.com/midnightercz/libcomps.git +-2. run cmake +- +- - for python2 bindings run cmake build system with no params: +- cd +- cmake +- - for python3 bindings run cmake build system with PYTHON_DESIRED param: +- cd +- cmake -DPYTHON_DESIRED:str=3 +-3. run make ++2. from the checkout dir: ++ ++ mkdir build ++ cd build/ ++ cmake ../libcomps -DPYTHON_DESIRED=3 ++ (alternatively cmake ../libcomps -DPYTHON_DESIRED=3 for python2 bindings) + make ++3. building the documentation: ++ ++ make docs ++ make pydocs + + ### Building rpm package +-1. run build\_prep.py for .spec file substitution and tarball creation: +- python build_prep.py +- or run the following code in Python: +- import build_prep +- build_prep.prepare() +-2. copy libcomps.spec and libcomps-(git_commit_rev).tar.xz to SPECS and +- SOURCES dirs +- cp libcomps-*.tar.xz / +- cp libcomps.spec / +-3. run rpmbuild. If you want build bindings only for specified verion of python +- edit top of libcomps.spec file: +- %global with_python 1 +- %global with_python3 1 ++You can use tito for building rpm package. From checkout dir: ++ ++ tito build --rpm --test + + ### Installing + * After successful build run: +diff --git a/build_prep.cmake b/build_prep.cmake +index a4ee56b..4300a7a 100644 +--- a/build_prep.cmake ++++ b/build_prep.cmake +@@ -169,6 +169,5 @@ set(GITARG archive ${GITREV} "--format=tar.gz" "--prefix=libcomps-${GITREVLONG}/ + set(GITCMD "git") + execute_process(COMMAND ${GITCMD} ${GITARG} OUTPUT_FILE ${archive_name}) + +-configure_file(libcomps.spec.in libcomps.spec) + configure_file(libcomps.pc.in libcomps.pc @ONLY) + +diff --git a/build_prep.py b/build_prep.py +deleted file mode 100755 +index e63b870..0000000 +--- a/build_prep.py ++++ /dev/null +@@ -1,164 +0,0 @@ +-#!/bin/env python +-import subprocess +-import sys +-import pprint +-import string +-import json +-from datetime import date +- +-def is_commit_tag(commit): +- p = subprocess.Popen(['git', 'describe', +- '--tags', "--exact-match", "%s"%commit], +- stdout=subprocess.PIPE, stderr=subprocess.PIPE) +- p.wait() +- if p.returncode is 0: +- return p.stdout.readline().strip() +- else: +- return None +- +-def tag_to_commit(tag): +- p = subprocess.Popen(['git', 'rev-parse', "%s^{commit}"%tag], +- stdout=subprocess.PIPE, stderr=subprocess.PIPE) +- p.wait() +- if p.returncode: +- return None +- x = p.stdout.readline().strip() +- return x +- +-def commits_date(commits): +- dates = [] +- for c in commits: +- p = subprocess.Popen(['git', 'log', '-1', "--format=%at", "%s"%c], +- stdout=subprocess.PIPE, stderr=subprocess.PIPE) +- p.wait() +- dates.append(int(p.stdout.read())) +- return dates +- +-def git_tags_chrono(): +- p = subprocess.Popen(['git', 'tag'], stdout=subprocess.PIPE) +- p.wait() +- if p.returncode: +- return None +- tags = [x.strip() for x in p.stdout] +- dates = [commits_date([t]) for t in tags] +- return [z[0] for z in sorted(zip(tags, dates), key=lambda x: x[1])] +- +-def git_tags(): +- p = subprocess.Popen(['git', 'tag'], stdout=subprocess.PIPE) +- if p.returncode: +- return None +- tags = [x.strip() for x in p.stdout] +- return tags +- +-def commits_for_tag(tags, tag): +- index = tags.index(tag) +- #print index +- if index == 0: +- prev = None +- else: +- prev = tags[index-1] +- prev = tag_to_commit(prev) +- tag = tag_to_commit(tag) +- #print prev +- +- commits = [] +- p = subprocess.Popen(['git', 'rev-list', '--all'], stdout=subprocess.PIPE) +- start = False +- for x in p.stdout: +- x = x.strip() +- #print x,tag +- if not start and x == tag: +- start = True +- #print "start true" +- if start: +- commits.append(x) +- if x == prev: +- break +- return commits +- +-def log_for_commits(commits, _format=None): +- log = [] +- if not _format: +- _args = ['git', 'log', '-1'] +- else: +- _args = ['git', 'log', '-1', '--format=%s'%_format] +- for x in commits: +- #print x +- p = subprocess.Popen(_args + [x], stdout=subprocess.PIPE) +- log.append([x.rstrip("\n") for x in p.stdout]) +- return log +- +-def format_chlog_msg(msg): +- msg = filter(lambda x: x != "", msg) +- for x in range(0, len(msg)): +- if not msg[x].startswith("- "): +- msg[x] = "- "+msg[x] +- return msg +- +-def build_chlog(tags ,top='HEAD'): +- f = open("chcommits", "r") +- chcommits = set([x.strip() for x in f]) +- f.close() +- +- log = [] +- for tag in tags: +- head = log_for_commits([tag], _format="%ct%n%cn <%ce>%n%B") +- head = ["*"]+head[0] +- head_body = head[3:] +- head = head[:3] +- head[1] = date.fromtimestamp(int(head[1])).strftime("%a %b %d %Y") +- head.append("-".join(tag.split("-")[1:])) +- #print head +- +- commits = commits_for_tag(tags, tag) +- loc_chcommits = list(chcommits & set(commits)) +- loc_log = log_for_commits(loc_chcommits, _format="%B") +- _log = [" ".join(head)] +- _log.append("\n".join(format_chlog_msg(head_body))) +- for x in loc_log: +- _log.append("\n".join(format_chlog_msg(x))) +- _log.append("") +- #print _log +- +- log.append("\n".join(_log)) +- return reversed(log) +- +-def prepare(ref='HEAD'): +- vfp = open("version.json", "r") +- version = json.load(vfp) +- vfp.close() +- +- subs = {} +- top_commit = subs["GITREVLONG"] = tag_to_commit(ref) +- +- subs.update(version) +- tags = git_tags_chrono() +- subs["CHANGELOG"] = "\n".join(build_chlog(tags, top_commit)) +- +- tag = is_commit_tag(top_commit) +- if not tag: +- subs["SOURCE_URL_PATH"] = "archive/%{commit}/libcomps-%{commit}.tar.gz" +- archive_name = "libcomps-%s.tar.gz"%(top_commit,) +- else: +- subs["SOURCE_URL_PATH"] = tags[-1]+".tar.gz" +- archive_name = "%s.tar.gz"%(tag,) +- +- subs["VERSION"] = "%s.%s.%s" % (subs["libcomps_VERSION_MAJOR"], +- subs["libcomps_VERSION_MINOR"], +- subs["libcomps_VERSION_PATCH"]) +- spec = open("libcomps.spec.in", "r") +- specstr_in = spec.read() +- spec.close() +- specstr_out = string.Template(specstr_in).safe_substitute(subs) +- spec = open("libcomps.spec", "w") +- spec.write(specstr_out) +- spec.close() +- +- p = subprocess.Popen(['git', 'archive', top_commit, "--format=tar.gz", +- "--prefix=libcomps-%s/"%(top_commit,), "-o", +- archive_name])#, +- #stdout=subprocess.PIPE, stderr=subprocess.PIPE) +- p.wait() +- +-if __name__ == "__main__": +- prepare(next(iter(sys.argv[1:]), 'HEAD')) +diff --git a/libcomps.spec b/libcomps.spec +new file mode 100644 +index 0000000..db0f7da +--- /dev/null ++++ b/libcomps.spec +@@ -0,0 +1,186 @@ ++# Do not build python3 bindings for RHEL <= 7 ++%if 0%{?rhel} && 0%{?rhel} <= 7 ++%bcond_with python3 ++%else ++%bcond_without python3 ++%endif ++ ++# Do not build python2 bindings for RHEL > 7 and Fedora > 29 ++%if 0%{?rhel} > 7 || 0%{?fedora} > 29 ++%bcond_with python2 ++%else ++%bcond_without python2 ++%endif ++ ++Name: libcomps ++Version: 0.1.10 ++Release: 2%{?dist} ++Summary: Comps XML file manipulation library ++ ++License: GPLv2+ ++URL: https://github.com/rpm-software-management/libcomps ++Source0: %{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz ++ ++BuildRequires: gcc-c++ ++BuildRequires: cmake ++BuildRequires: gcc ++BuildRequires: libxml2-devel ++BuildRequires: check-devel ++BuildRequires: expat-devel ++ ++%description ++Libcomps is library for structure-like manipulation with content of ++comps XML files. Supports read/write XML file, structure(s) modification. ++ ++%package devel ++Summary: Development files for libcomps library ++Requires: %{name}%{?_isa} = %{version}-%{release} ++ ++%description devel ++Development files for libcomps library. ++ ++%package doc ++Summary: Documentation files for libcomps library ++Requires: %{name} = %{version}-%{release} ++BuildArch: noarch ++BuildRequires: doxygen ++ ++%description doc ++Documentation files for libcomps library. ++ ++%package -n python-%{name}-doc ++Summary: Documentation files for python bindings libcomps library ++Requires: %{name} = %{version}-%{release} ++BuildArch: noarch ++%if %{with python3} ++BuildRequires: python3-sphinx ++%endif ++%if %{with python2} ++BuildRequires: python2-sphinx ++%endif ++ ++%description -n python-%{name}-doc ++Documentation files for python bindings libcomps library. ++ ++%if %{with python2} ++%package -n python2-%{name} ++Summary: Python 2 bindings for libcomps library ++%{?python_provide:%python_provide python2-%{name}} ++BuildRequires: python2-devel ++Requires: %{name}%{?_isa} = %{version}-%{release} ++ ++%description -n python2-%{name} ++Python 2 bindings for libcomps library. ++%endif ++ ++%if %{with python3} ++%package -n python3-%{name} ++Summary: Python 3 bindings for libcomps library ++BuildRequires: python3-devel ++%{?python_provide:%python_provide python3-%{name}} ++Requires: %{name}%{?_isa} = %{version}-%{release} ++Obsoletes: platform-python-%{name} < %{version}-%{release} ++ ++%description -n python3-%{name} ++Python3 bindings for libcomps library. ++%endif ++ ++%prep ++%autosetup -n %{name}-%{name}-%{version} ++ ++%if %{with python2} ++mkdir build-py2 ++%endif ++%if %{with python3} ++mkdir build-py3 ++%endif ++mkdir build-doc ++ ++%build ++%if %{with python2} ++pushd build-py2 ++ %cmake ../libcomps/ -DPYTHON_DESIRED:STRING=2 ++ %make_build ++popd ++%endif ++ ++%if %{with python3} ++pushd build-py3 ++ %cmake ../libcomps/ -DPYTHON_DESIRED:STRING=3 ++ %make_build ++popd ++%endif ++ ++pushd build-doc ++%if %{with python2} ++ %cmake ../libcomps/ -DPYTHON_DESIRED:STRING=2 ++%else ++%if %{with python3} ++ %cmake ../libcomps/ -DPYTHON_DESIRED:STRING=3 ++%endif ++%endif ++ make %{?_smp_mflags} docs ++ make %{?_smp_mflags} pydocs ++popd ++ ++%install ++%if %{with python2} ++pushd build-py2 ++ %make_install ++popd ++%endif ++ ++%if %{with python3} ++pushd build-py3 ++ %make_install ++popd ++%endif ++ ++%check ++%if %{with python2} ++pushd build-py2 ++ make test ++ make pytest ++popd ++%endif ++ ++%if %{with python3} ++pushd build-py3 ++ make test ++ make pytest ++popd ++%endif ++ ++%if 0%{?rhel} && 0%{?rhel} <= 7 ++%post -p /sbin/ldconfig ++%postun -p /sbin/ldconfig ++%else ++%ldconfig_scriptlets ++%endif ++ ++%files ++%license COPYING ++%doc README.md ++%{_libdir}/%{name}.so.* ++ ++%files devel ++%{_libdir}/%{name}.so ++%{_includedir}/%{name}/ ++ ++%files doc ++%doc build-doc/docs/libcomps-doc/html ++ ++%files -n python-%{name}-doc ++%doc build-doc/src/python/docs/html ++ ++%if %{with python2} ++%files -n python2-%{name} ++%{python2_sitearch}/%{name}/ ++%endif ++ ++%if %{with python3} ++%files -n python3-%{name} ++%{python3_sitearch}/%{name}/ ++%endif ++ ++%changelog +diff --git a/libcomps.spec.in b/libcomps.spec.in +deleted file mode 100644 +index 22d54d2..0000000 +--- a/libcomps.spec.in ++++ /dev/null +@@ -1,156 +0,0 @@ +-%global commit ${GITREVLONG} +- +-%if 0%{?rhel} && 0%{?rhel} <= 7 +-%define python3_build 0 +-#%{!?__python2: %global __python2 /usr/bin/python2} +-#%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +-#%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +-%else +-%define python3_build 1 +-%endif +- +- +-Name: libcomps +-Version: ${VERSION} +-Release: ${libcomps_RELEASE}%{?dist} +-Summary: Comps XML file manipulation library +- +-Group: Development/Libraries +-License: GPLv2+ +-URL: https://github.com/midnightercz/libcomps/ +-Source0: https://github.com/midnightercz/libcomps/${SOURCE_URL_PATH} +-BuildRequires: libxml2-devel +-BuildRequires: check-devel +-BuildRequires: expat-devel +-#%if 0%{?rhel} == 6 +-#BuildRequires: cmake28 +-#%else +-BuildRequires: cmake +-#%endif +- +-%description +-Libcomps is library for structure-like manipulation with content of +-comps XML files. Supports read/write XML file, structure(s) modification. +- +-%package doc +-Summary: Documentation files for libcomps library +-Group: Documentation +-Requires: %{name} = %{version}-%{release} +-BuildArch: noarch +-BuildRequires: doxygen +- +-%description doc +-Documentation files for libcomps library +- +-%package -n python-libcomps-doc +-Summary: Documentation files for python bindings libcomps library +-Group: Documentation +-Requires: %{name} = %{version}-%{release} +-BuildArch: noarch +-BuildRequires: python-sphinx +- +-%description -n python-libcomps-doc +-Documentation files for python bindings libcomps library +- +-%package devel +-Summary: Development files for libcomps library +-Group: Development/Libraries +-Requires: %{name}%{?_isa} = %{version}-%{release} +- +-%description devel +-Development files for libcomps library +- +-%package -n python-libcomps +-Summary: Python2 bindings for libcomps library +-Group: Development/Libraries +-BuildRequires: python-devel +-Requires: %{name}%{?_isa} = %{version}-%{release} +- +-%description -n python-libcomps +-Python2 bindings for libcomps library +- +-%if %python3_build +-%package -n python3-libcomps +-Summary: Python3 bindings for libcomps library +-Group: Development/Libraries +-BuildRequires: python3-devel +-Requires: %{name}%{?_isa} = %{version}-%{release} +- +-%description -n python3-libcomps +-Python3 bindings for libcomps library +-%endif +- +-%prep +-%setup -qn %{name}-%{commit} +- +-%if %python3_build == 1 +-rm -rf py3 +-mkdir ../py3 +-cp -a . ../py3/ +-mv ../py3 ./ +-%endif +- +-%build +-%cmake -DPYTHON_DESIRED:STRING=2 libcomps/ +-make %{?_smp_mflags} +-make %{?_smp_mflags} docs +-make %{?_smp_mflags} pydocs +- +-%if %python3_build == 1 +-pushd py3 +-%cmake -DPYTHON_DESIRED:STRING=3 libcomps/ +-make %{?_smp_mflags} +-popd +-%endif +- +- +-%check +-make test +-%if %{python3_build} +-pushd py3 +-make pytest +-popd +-%endif +- +-%install +-make install DESTDIR=%{buildroot} +- +-%if %{python3_build} +-pushd py3 +-make install DESTDIR=%{buildroot} +-popd +-%endif +- +-%clean +-rm -rf $buildroot +- +-%post -p /sbin/ldconfig +- +-%postun -p /sbin/ldconfig +- +-%files +-%{_libdir}/libcomps.so.* +-%doc README.md COPYING +- +-%files devel +-%{_libdir}/libcomps.so +-%{_includedir}/* +- +-%files doc +-%doc docs/libcomps-doc/html +- +-%files -n python-libcomps-doc +-%doc src/python/docs/html +- +-%files -n python-libcomps +-%{_libdir}/python2* +-#%exclude %{_libdir}/python2/libcomps/__pycache__ +- +-%if %{python3_build} +-%files -n python3-libcomps +-%{_libdir}/python3* +-#%exclude %{_libdir}/python3/libcomps/__pycache__ +-%endif +- +-%changelog +-${CHANGELOG} +diff --git a/libcomps/src/python/docs/doc-sources/conf.py b/libcomps/src/python/docs/doc-sources/conf.py +deleted file mode 100644 +index 5b62c17..0000000 +--- a/libcomps/src/python/docs/doc-sources/conf.py ++++ /dev/null +@@ -1,265 +0,0 @@ +-# -*- coding: utf-8 -*- +-# +-# x documentation build configuration file, created by +-# sphinx-quickstart on Mon Dec 9 16:34:26 2013. +-# +-# This file is execfile()d with the current directory set to its containing dir. +-# +-# Note that not all possible configuration values are present in this +-# autogenerated file. +-# +-# All configuration values have a default; values that are commented out +-# serve to show the default. +- +-import sys, os +- +-# 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. +- +-import ctypes +-clibcomps = ctypes.cdll.LoadLibrary("/home/jluza/libcomps/libcomps-build/src/libcomps.so.0.1.6") +-os.environ['LD_LIBRARY_PATH'] = "%s" % "/home/jluza/libcomps/libcomps-build/src" +-print os.environ['LD_LIBRARY_PATH'] +- +-sys.path.insert(0, os.path.abspath("/home/jluza/libcomps/libcomps-build/src/python/src/python2")) +-import libcomps +- +-# -- General configuration ----------------------------------------------------- +- +-# If your documentation needs a minimal Sphinx version, state it here. +-#needs_sphinx = '1.0' +- +-# 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.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath'] +- +-# Add any paths that contain templates here, relative to this directory. +-templates_path = ['_templates'] +- +-# The suffix of source filenames. +-source_suffix = '.rst' +- +-# The encoding of source files. +-#source_encoding = 'utf-8-sig' +- +-# The master toctree document. +-master_doc = 'index' +- +-# General information about the project. +-project = u'libcomps' +-copyright = u'RedHat 2013' +- +-# 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 = '0.1.6' +-# The full version, including alpha/beta/rc tags. +-release = ("0." "1." +- "6-" "9") +- +-# The language for content autogenerated by Sphinx. Refer to documentation +-# for a list of supported languages. +-#language = None +- +-# There are two options for replacing |today|: either, you set today to some +-# non-false value, then it is used: +-#today = '' +-# Else, today_fmt is used as the format for a strftime call. +-#today_fmt = '%B %d, %Y' +- +- +-autodoc_member_order = "groupwise" +- +-# List of patterns, relative to source directory, that match files and +-# directories to ignore when looking for source files. +-exclude_patterns = [] +- +-# The reST default role (used for this markup: `text`) to use for all documents. +-#default_role = None +- +-# If true, '()' will be appended to :func: etc. cross-reference text. +-#add_function_parentheses = True +- +-# If true, the current module name will be prepended to all description +-# unit titles (such as .. function::). +-#add_module_names = True +- +-# If true, sectionauthor and moduleauthor directives will be shown in the +-# output. They are ignored by default. +-#show_authors = False +- +-# The name of the Pygments (syntax highlighting) style to use. +-pygments_style = 'sphinx' +- +-# A list of ignored prefixes for module index sorting. +-#modindex_common_prefix = [] +- +- +-# -- Options for HTML output --------------------------------------------------- +- +-# The theme to use for HTML and HTML Help pages. See the documentation for +-# a list of builtin themes. +-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 +-# documentation. +-#html_theme_options = {} +- +-# Add any paths that contain custom themes here, relative to this directory. +-#html_theme_path = [] +- +-# The name for this set of Sphinx documents. If None, it defaults to +-# " v documentation". +-#html_title = None +- +-# A shorter title for the navigation bar. Default is the same as html_title. +-#html_short_title = None +- +-# The name of an image file (relative to this directory) to place at the top +-# of the sidebar. +-#html_logo = None +- +-# The name of an image file (within the static path) to use as favicon of the +-# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +-# pixels large. +-#html_favicon = None +- +-# 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'] +- +-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +-# using the given strftime format. +-#html_last_updated_fmt = '%b %d, %Y' +- +-# If true, SmartyPants will be used to convert quotes and dashes to +-# typographically correct entities. +-#html_use_smartypants = True +- +-# Custom sidebar templates, maps document names to template names. +-#html_sidebars = {} +- +-# Additional templates that should be rendered to pages, maps page names to +-# template names. +-#html_additional_pages = {} +- +-# If false, no module index is generated. +-#html_domain_indices = True +- +-# If false, no index is generated. +-#html_use_index = True +- +-# If true, the index is split into individual pages for each letter. +-#html_split_index = False +- +-# If true, links to the reST sources are added to the pages. +-#html_show_sourcelink = True +- +-# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +-#html_show_sphinx = True +- +-# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +-#html_show_copyright = True +- +-# If true, an OpenSearch description file will be output, and all pages will +-# contain a tag referring to it. The value of this option must be the +-# base URL from which the finished HTML is served. +-#html_use_opensearch = '' +- +-# This is the file name suffix for HTML files (e.g. ".xhtml"). +-#html_file_suffix = None +- +-# Output file base name for HTML help builder. +-htmlhelp_basename = 'xdoc' +- +- +-# -- Options for LaTeX output -------------------------------------------------- +- +-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': '', +-} +- +-# Grouping the document tree into LaTeX files. List of tuples +-# (source start file, target name, title, author, documentclass [howto/manual]). +-latex_documents = [ +- ('index', 'x.tex', u'x Documentation', +- u'x', 'manual'), +-] +- +-# The name of an image file (relative to this directory) to place at the top of +-# the title page. +-#latex_logo = None +- +-# For "manual" documents, if this is true, then toplevel headings are parts, +-# not chapters. +-#latex_use_parts = False +- +-# If true, show page references after internal links. +-#latex_show_pagerefs = False +- +-# If true, show URL addresses after external links. +-#latex_show_urls = False +- +-# Documents to append as an appendix to all manuals. +-#latex_appendices = [] +- +-# If false, no module index is generated. +-#latex_domain_indices = True +- +- +-# -- Options for manual page output -------------------------------------------- +- +-# One entry per manual page. List of tuples +-# (source start file, name, description, authors, manual section). +-man_pages = [ +- ('index', 'x', u'x Documentation', +- [u'x'], 1) +-] +- +-# If true, show URL addresses after external links. +-#man_show_urls = False +- +- +-# -- Options for Texinfo output ------------------------------------------------ +- +-# Grouping the document tree into Texinfo files. List of tuples +-# (source start file, target name, title, author, +-# dir menu entry, description, category) +-texinfo_documents = [ +- ('index', 'x', u'x Documentation', +- u'x', 'x', 'One line description of project.', +- 'Miscellaneous'), +-] +- +-# Documents to append as an appendix to all manuals. +-#texinfo_appendices = [] +- +-# If false, no module index is generated. +-#texinfo_domain_indices = True +- +-# How to display URL addresses: 'footnote', 'no', or 'inline'. +-#texinfo_show_urls = 'footnote' +- +- +-def skip(app, what, name, obj, skip, options): +- if what == "module" and type(obj).__name__ == "builtin_function_or_method": +- return False +- if name == "__init__": +- return type(obj).__name__ == "wrapper_descriptor" +- return skip +-def setup(app): +- app.connect("autodoc-skip-member", skip) +- +-# Example configuration for intersphinx: refer to the Python standard library. +diff --git a/libcomps/src/python/docs/doc-sources/conf.py.in b/libcomps/src/python/docs/doc-sources/conf.py.in +index 340efaf..cf96bd1 100644 +--- a/libcomps/src/python/docs/doc-sources/conf.py.in ++++ b/libcomps/src/python/docs/doc-sources/conf.py.in +@@ -32,7 +32,7 @@ import libcomps + + # 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.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath'] ++extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage'] + + # Add any paths that contain templates here, relative to this directory. + templates_path = ['_templates'] +-- +1.8.3.1 + diff --git a/libcomps.spec b/libcomps.spec index 241508c..f50b308 100644 --- a/libcomps.spec +++ b/libcomps.spec @@ -3,12 +3,14 @@ Name: libcomps Version: 0.1.10 -Release: 1 +Release: 2 Summary: Comps XML file manipulation library License: GPLv2+ URL: https://github.com/rpm-software-management/libcomps Source0: %{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +Patch0: Spec-file-and-updated-building-documentation.patch + BuildRequires: gcc cmake zlib-devel libxml2-devel check-devel expat-devel Provides: libcomps.so.0.1.6()(64bit) @@ -135,6 +137,12 @@ popd %endif %changelog +* Mon Sep 21 2020 Liquor - 0.1.10-2 +- Type:bugfix +- ID:NA +- SUG:NA +- Spec file and updated building documentation + * Sat Aug 1 2020 zhangguangzhi - 0.1.10-1 - Type:enhancement - ID:NA -- Gitee