-#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# fio documentation build configuration file, created by
# -- General configuration ------------------------------------------------
+from __future__ import absolute_import
+from __future__ import print_function
+
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# General information about the project.
project = 'fio'
-copyright = '2016, Jens Axboe <axboe@kernel.dk>'
+copyright = '2017, Jens Axboe <axboe@kernel.dk>'
author = 'Jens Axboe <axboe@kernel.dk>'
# 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'
+# version = '1'
# The full version, including alpha/beta/rc tags.
-release = '1'
+# release = '1'
+
+def fio_version():
+
+ from os.path import exists, dirname, join
+ wsroot = dirname(dirname(__file__))
+ version_file = join(wsroot, "FIO-VERSION-FILE")
+ if not exists(version_file):
+ version_gen = join(wsroot, "FIO-VERSION-GEN")
+ from subprocess import call
+ rc = call(version_gen, shell=True, cwd=wsroot)
+ if rc:
+ print("Couldn't generate version file. rc=%r" % rc)
+ return "Unknown", "Unknown"
+
+ vsl = open(version_file).read().strip().split('-')
+ version = vsl[1]
+ release = '-'.join(vsl[1:])
+ return version, release
+
+version, release = fio_version()
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
-exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
+exclude_patterns = ['output', 'Thumbs.db', '.DS_Store', 'fio_examples.rst']
# The reST default role (used for this markup: `text`) to use for all
# documents.
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- (master_doc, 'fio', 'fio Documentation',
+ ('fio_man', 'fio', 'flexible I/O tester',
[author], 1)
]