Skip to content

Commit

Permalink
Merge pull request #2448 from OSInside/no_pdf_docs
Browse files Browse the repository at this point in the history
Drop PDF build of the documentation
  • Loading branch information
Conan-Kudo authored Feb 11, 2024
2 parents e91e29e + 1834798 commit 84709c2
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 121 deletions.
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ include tox.ini
include kiwi.yml

recursive-include doc/build/man *
recursive-include *.gz *.iso *.kiwi *.pf2 *.py *.txt *.xml *.xz

include .bumpversion.cfg
include .coverage*
Expand Down
11 changes: 2 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ install_dracut:

install_package_docs:
install -d -m 755 ${buildroot}${docdir}/python-kiwi
install -m 644 doc/build/latex/kiwi.pdf \
${buildroot}${docdir}/python-kiwi/kiwi.pdf
install -m 644 LICENSE \
${buildroot}${docdir}/python-kiwi/LICENSE
install -m 644 README.rst \
Expand Down Expand Up @@ -49,6 +47,8 @@ kiwi/schema/kiwi.rng: kiwi/schema/kiwi.rnc
# whenever the schema is changed this target will convert
# the short form of the RelaxNG schema to the format used
# in code and auto generates the python data structures
@type -p trang &>/dev/null || \
(echo "ERROR: trang not found in path: $(PATH)"; exit 1)
trang -I rnc -O rng kiwi/schema/kiwi.rnc kiwi/schema/kiwi.rng
# XML parser code is auto generated from schema using generateDS
# http://pythonhosted.org/generateDS
Expand Down Expand Up @@ -101,13 +101,6 @@ build: clean tox
mv setup.pye setup.py
# provide rpm source tarball
mv dist/kiwi-${version}.tar.gz dist/python-kiwi.tar.gz
# append PDF documentation to tarball
gzip -d dist/python-kiwi.tar.gz
mkdir -p kiwi-${version}/doc/build/latex
mv doc/build/latex/kiwi.pdf kiwi-${version}/doc/build/latex
tar -uf dist/python-kiwi.tar kiwi-${version}/doc/build/latex/kiwi.pdf
gzip dist/python-kiwi.tar
rm -rf kiwi-${version}
# update rpm changelog using reference file
helper/update_changelog.py --since package/python-kiwi.changes > \
dist/python-kiwi.changes
Expand Down
83 changes: 15 additions & 68 deletions doc/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,53 +44,19 @@ Create a local clone of the forked repository
Install Required Operating System Packages
------------------------------------------

{kiwi} requires the following additional packages which are not provided by
:command:`pip`. Those will be installed by calling the
`install_devel_packages.sh` helper script from the checked out Git
repository as follows:
{kiwi} requires additional packages at runtime which are not
provided by :command:`pip`. Those will be pulled in by installing
the following package:

.. code:: shell-session
$ sudo helper/install_devel_packages.sh
.. note::

The helper script checks for the package managers `zypper` and
`dnf` and associates a distribution with it. If you use a
distribution that does not use one of those package managers
the script will not install any packages and exit with an
error message. In this case we recommend to take a look at
the package list encoded in the script and adapt to your
distribution and package manager as needed. Because distributions
also changes on a regular basis it might happen that the
`install_devel_packages` helper is not 100% accurate or outdated
depending on your host system. In this case the following
list describes the needed components and we are happy to
received feedback or patches to make `install_devel_packages`
a better experience.

XML processing libraries
`libxml2` and `libxslt` (for :mod:`lxml`)

Python header files, GCC compiler and glibc-devel header files
Required for python modules that hooks into shared library context
and often named similar to: `python3-devel`

Spell Checking library
Provided by the `enchant` library

ShellCheck
`ShellCheck <https://github.com/koalaman/shellcheck>`_ script linter.

ISO creation program `xorriso`.
* kiwi-systemdeps

LaTeX documentation build environment
A full LaTeX installation is required to build the PDF documentation
[#f1]_.

Host Requirements To Build Images
A set of tools needed to build images and provided by
the `kiwi-systemdeps` package
The package is provided on the Open Build Service in the
`Virtualization:Appliances:Builder
<https://download.opensuse.org/repositories/Virtualization:/Appliances:/Builder>`__
project. For manual inspection of the packages
that are pulled in from the above kiwi-systemdeps package, please refer
to the `package/python-kiwi-spec-template` spec file from the checked
out Git repository.

Create a Python Virtual Development Environment
-----------------------------------------------
Expand Down Expand Up @@ -255,27 +221,16 @@ Coding Style

- The names of constants are not written in all capital letters.


Documentation
~~~~~~~~~~~~~

{kiwi} uses `Sphinx <https://www.sphinx-doc.org/en/master/>`_ for the API and
user documentation.

In order to build the HTML documentation call:
{kiwi} uses `Sphinx <https://www.sphinx-doc.org/en/master/>`_ for the API,
user documentation and manual pages

.. code:: shell-session
tox -e doc
or to build the full documentation (including a PDF generated by LaTeX
[#f3]_):

.. code:: shell-session
tox -e packagedoc
Document all your classes, methods, their parameters and their types using
the standard `reStructuredText
<https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
Expand Down Expand Up @@ -326,7 +281,7 @@ found in `doc/source`. General documentation should be put into the
specialized topics would belong into the `building/` subfolder.

Adhere to a line limit of 75 characters when writing the user facing
documentation [#f2]_.
documentation [#f1]_.


Additional Information
Expand Down Expand Up @@ -432,13 +387,7 @@ directly build it with :command:`rpmbuild`, :command:`fedpkg`, or submitted
to the Open Build Service using :command:`osc`.


.. [#f1] Sphinx requires a plethora of additional LaTeX
packages. Unfortunately there is currently no comprehensive list
available. On Ubuntu/Debian installing `texlive-latex-extra`
should be sufficient. For Fedora, consult the package list
from :file:`.gitlab-ci.yml`.
.. [#f2] Configure your editor to automatically break lines and/or reformat
.. [#f1] Configure your editor to automatically break lines and/or reformat
paragraphs. For Emacs you can use `M-x set-fill-column RET 75` and
`M-x auto-fill-mode RET` for automatic filling of paragraphs in
conjunction with `M-x fill-paragraph` (usually bound to `M-q`) to
Expand All @@ -447,5 +396,3 @@ to the Open Build Service using :command:`osc`.
Emacs since version `23.1`).
Vim users can set the text width via `:tw 75` and then use the
commands `gwip` or `gq`.
.. [#f3] Requires a full LaTeX installation.
31 changes: 0 additions & 31 deletions helper/install_devel_packages.sh

This file was deleted.

3 changes: 1 addition & 2 deletions package/python-kiwi-spec-template
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ make buildroot=%{buildroot}/ install
# Install dracut modules
make buildroot=%{buildroot}/ install_dracut

# Install documentation in PDF format
# Install documentation README / LICENSE
make buildroot=%{buildroot}/ docdir=%{_defaultdocdir}/ install_package_docs

# Create symlinks for correct binaries
Expand Down Expand Up @@ -696,7 +696,6 @@ fi
%{_defaultdocdir}/python-kiwi/README

%files -n kiwi-man-pages
%{_defaultdocdir}/python-kiwi/kiwi.pdf
%config %_sysconfdir/kiwi.yml
%doc %{_mandir}/man8/*

Expand Down
10 changes: 0 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ usedevelop = True
deps = {[testenv]deps}
changedir=doc
commands =
{[testenv:doc.latexpdf]commands}
{[testenv:doc.man]commands}


Expand Down Expand Up @@ -188,15 +187,6 @@ commands =
mv build/xml build/restxml


[testenv:doc.latexpdf]
description = Documentation build PDF result
skip_install = True
deps = {[testenv:doc]deps}
changedir=doc
commands =
make latexpdf


[testenv:doc.man]
description = Documentation build man pages
skip_install = True
Expand Down

0 comments on commit 84709c2

Please sign in to comment.