build+ci: switch to python3
Also in this commit:
* Sync CI scripts with other projects
* Sync sphinx_build waf tool with ndn-cxx
* Modernize docs/conf.py
* Replace redmine_issue extension with sphinx.ext.extlinks
* Fix typo in docs/doxygen.conf.in
* Improve README.md
Refs: #5095
Change-Id: Iee05500f907442dd7cb3e41bd613beef7461dab4
diff --git a/.jenkins b/.jenkins
index 674d751..bc1c847 100755
--- a/.jenkins
+++ b/.jenkins
@@ -1,10 +1,32 @@
#!/usr/bin/env bash
set -e
+source .jenkins.d/util.sh
-DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+export CACHE_DIR=${CACHE_DIR:-/tmp}
+export WAF_JOBS=${WAF_JOBS:-1}
+[[ $JOB_NAME == *"code-coverage" ]] && export DISABLE_ASAN=yes
-for file in "$DIR"/.jenkins.d/*; do
+nanos() {
+ # Cannot use date(1) because macOS does not support %N format specifier
+ python3 -c 'import time; print(int(time.time() * 1e9))'
+}
+
+for file in .jenkins.d/*; do
[[ -f $file && -x $file ]] || continue
- echo "Run: $file"
+
+ if [[ -n $TRAVIS ]]; then
+ label=$(basename "$file" | sed -E 's/[[:digit:]]+-(.*)\..*/\1/')
+ echo -ne "travis_fold:start:${label}\r"
+ echo -ne "travis_time:start:${label}\r"
+ start=$(nanos)
+ fi
+
+ echo "\$ $file"
"$file"
+
+ if [[ -n $TRAVIS ]]; then
+ finish=$(nanos)
+ echo -ne "travis_time:end:${label}:start=${start},finish=${finish},duration=$((finish-start)),event=${label}\r"
+ echo -ne "travis_fold:end:${label}\r"
+ fi
done
diff --git a/.jenkins.d/00-deps.sh b/.jenkins.d/00-deps.sh
index 84c8ae1..458bbd0 100755
--- a/.jenkins.d/00-deps.sh
+++ b/.jenkins.d/00-deps.sh
@@ -1,31 +1,32 @@
#!/usr/bin/env bash
-set -e
-
-JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-source "$JDIR"/util.sh
-
-set -x
+set -ex
if has OSX $NODE_LABELS; then
FORMULAE=(boost openssl pkg-config)
- brew update
- if [[ -n $TRAVIS ]]; then
- # travis images come with a large number of brew packages
- # pre-installed, don't waste time upgrading all of them
- for FORMULA in "${FORMULAE[@]}"; do
- brew outdated $FORMULA || brew upgrade $FORMULA
- done
- else
- brew upgrade
+ if has OSX-10.13 $NODE_LABELS || has OSX-10.14 $NODE_LABELS; then
+ FORMULAE+=(python)
fi
- brew install "${FORMULAE[@]}"
- brew cleanup
-fi
-if has Ubuntu $NODE_LABELS; then
+ if [[ -n $TRAVIS ]]; then
+ # Travis images come with a large number of pre-installed
+ # brew packages, don't waste time upgrading all of them
+ brew list --versions "${FORMULAE[@]}" || brew update
+ for FORMULA in "${FORMULAE[@]}"; do
+ brew list --versions "$FORMULA" || brew install "$FORMULA"
+ done
+ # Ensure /usr/local/opt/openssl exists
+ brew reinstall openssl
+ else
+ brew update
+ brew upgrade
+ brew install "${FORMULAE[@]}"
+ brew cleanup
+ fi
+
+elif has Ubuntu $NODE_LABELS; then
sudo apt-get -qq update
- sudo apt-get -qy install build-essential pkg-config libboost-all-dev \
- libsqlite3-dev libssl-dev
+ sudo apt-get -qy install g++ pkg-config python3-minimal \
+ libboost-all-dev libssl-dev libsqlite3-dev
if [[ $JOB_NAME == *"code-coverage" ]]; then
sudo apt-get -qy install gcovr lcov libgd-perl
diff --git a/.jenkins.d/01-ndn-cxx.sh b/.jenkins.d/01-ndn-cxx.sh
index 29a41ea..4e0e154 100755
--- a/.jenkins.d/01-ndn-cxx.sh
+++ b/.jenkins.d/01-ndn-cxx.sh
@@ -1,12 +1,7 @@
#!/usr/bin/env bash
-set -e
+set -ex
-JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-source "$JDIR"/util.sh
-
-set -x
-
-pushd "${CACHE_DIR:-/tmp}" >/dev/null
+pushd "$CACHE_DIR" >/dev/null
INSTALLED_VERSION=
if has OSX $NODE_LABELS; then
@@ -22,35 +17,39 @@
INSTALLED_VERSION=$(git -C ndn-cxx rev-parse HEAD 2>/dev/null || echo NONE)
fi
-sudo rm -Rf ndn-cxx-latest
-
-git clone --depth 1 git://github.com/named-data/ndn-cxx ndn-cxx-latest
-
+sudo rm -rf ndn-cxx-latest
+git clone --depth 1 https://github.com/named-data/ndn-cxx.git ndn-cxx-latest
LATEST_VERSION=$(git -C ndn-cxx-latest rev-parse HEAD 2>/dev/null || echo UNKNOWN)
if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then
- sudo rm -Rf ndn-cxx
+ sudo rm -rf ndn-cxx
mv ndn-cxx-latest ndn-cxx
else
- sudo rm -Rf ndn-cxx-latest
+ sudo rm -rf ndn-cxx-latest
fi
sudo rm -f /usr/local/bin/ndnsec*
sudo rm -fr /usr/local/include/ndn-cxx
-sudo rm -f /usr/local/lib/libndn-cxx*
-sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx.pc
+sudo rm -f /usr/local/lib{,64}/libndn-cxx*
+sudo rm -f /usr/local/lib{,64}/pkgconfig/libndn-cxx.pc
pushd ndn-cxx >/dev/null
-./waf configure --color=yes --enable-shared --disable-static --without-osx-keychain
-./waf build --color=yes -j${WAF_JOBS:-1}
-sudo_preserve_env PATH -- ./waf install --color=yes
+if has CentOS-8 $NODE_LABELS; then
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1721553
+ PCH="--without-pch"
+fi
+
+./waf --color=yes configure --disable-static --enable-shared --without-osx-keychain $PCH
+./waf --color=yes build -j$WAF_JOBS
+sudo_preserve_env PATH -- ./waf --color=yes install
popd >/dev/null
popd >/dev/null
+if has CentOS-8 $NODE_LABELS; then
+ sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
+fi
if has Linux $NODE_LABELS; then
sudo ldconfig
-elif has FreeBSD10 $NODE_LABELS; then
- sudo ldconfig -m
fi
diff --git a/.jenkins.d/10-build.sh b/.jenkins.d/10-build.sh
index 8907de1..20e6bd1 100755
--- a/.jenkins.d/10-build.sh
+++ b/.jenkins.d/10-build.sh
@@ -1,47 +1,41 @@
#!/usr/bin/env bash
-set -e
+set -ex
-JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-source "$JDIR"/util.sh
+git submodule sync
+git submodule update --init
-set -x
-
-if [[ $JOB_NAME == *"code-coverage" ]]; then
- COVERAGE="--with-coverage"
-elif [[ -z $DISABLE_ASAN ]]; then
+if [[ -z $DISABLE_ASAN ]]; then
ASAN="--with-sanitizer=address"
fi
-
-# Cleanup
-sudo_preserve_env PATH -- ./waf --color=yes distclean
-
-if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then
- # Configure/build in optimized mode with tests
- ./waf --color=yes configure --with-tests
- ./waf --color=yes build -j${WAF_JOBS:-1}
-
- # Cleanup
- sudo_preserve_env PATH -- ./waf --color=yes distclean
-
- # Configure/build in optimized mode without tests
- ./waf --color=yes configure
- ./waf --color=yes build -j${WAF_JOBS:-1}
-
- # Cleanup
- sudo_preserve_env PATH -- ./waf --color=yes distclean
+if [[ $JOB_NAME == *"code-coverage" ]]; then
+ COVERAGE="--with-coverage"
fi
-# Configure/build in debug mode with tests
-./waf --color=yes configure --debug --with-tests $ASAN $COVERAGE
-./waf --color=yes build -j${WAF_JOBS:-1}
+if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then
+ # Build in release mode with tests
+ ./waf --color=yes configure --with-tests
+ ./waf --color=yes build -j$WAF_JOBS
-# (tests will be run against debug version)
+ # Cleanup
+ ./waf --color=yes distclean
+
+ # Build in release mode without tests
+ ./waf --color=yes configure
+ ./waf --color=yes build -j$WAF_JOBS
+
+ # Cleanup
+ ./waf --color=yes distclean
+fi
+
+# Build in debug mode with tests
+./waf --color=yes configure --debug --with-tests $ASAN $COVERAGE
+./waf --color=yes build -j$WAF_JOBS
+
+# (tests will be run against the debug version)
# Install
sudo_preserve_env PATH -- ./waf --color=yes install
if has Linux $NODE_LABELS; then
sudo ldconfig
-elif has FreeBSD $NODE_LABELS; then
- sudo ldconfig -a
fi
diff --git a/.jenkins.d/20-tests.sh b/.jenkins.d/20-tests.sh
index 816a792..e2db89c 100755
--- a/.jenkins.d/20-tests.sh
+++ b/.jenkins.d/20-tests.sh
@@ -1,15 +1,10 @@
#!/usr/bin/env bash
-set -e
-
-JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-source "$JDIR"/util.sh
-
-set -x
+set -ex
# Prepare environment
-rm -Rf ~/.ndn
+rm -rf ~/.ndn
-BOOST_VERSION=$(python -c "import sys; sys.path.append('build/c4che'); import _cache; print(_cache.BOOST_VERSION_NUMBER);")
+BOOST_VERSION=$(python3 -c "import sys; sys.path.append('build/c4che'); import _cache; print(_cache.BOOST_VERSION_NUMBER);")
ut_log_args() {
if (( BOOST_VERSION >= 106200 )); then
@@ -24,13 +19,14 @@
fi
}
+# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
ASAN_OPTIONS="color=always"
-ASAN_OPTIONS+=":detect_stack_use_after_return=true"
-ASAN_OPTIONS+=":check_initialization_order=true"
-ASAN_OPTIONS+=":strict_init_order=true"
-ASAN_OPTIONS+=":detect_invalid_pointer_pairs=1"
-ASAN_OPTIONS+=":detect_container_overflow=false"
-ASAN_OPTIONS+=":strict_string_checks=true"
+ASAN_OPTIONS+=":check_initialization_order=1"
+ASAN_OPTIONS+=":detect_stack_use_after_return=1"
+ASAN_OPTIONS+=":strict_init_order=1"
+ASAN_OPTIONS+=":strict_string_checks=1"
+ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2"
+ASAN_OPTIONS+=":detect_container_overflow=0"
ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
export ASAN_OPTIONS
diff --git a/.jenkins.d/30-coverage.sh b/.jenkins.d/30-coverage.sh
index a96e999..bb2809d 100755
--- a/.jenkins.d/30-coverage.sh
+++ b/.jenkins.d/30-coverage.sh
@@ -1,10 +1,5 @@
#!/usr/bin/env bash
-set -e
-
-JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-source "$JDIR"/util.sh
-
-set -x
+set -ex
if [[ $JOB_NAME == *"code-coverage" ]]; then
gcovr --object-directory=build \
@@ -31,6 +26,6 @@
--frames \
--legend \
--output-directory build/coverage \
- --title "NDN-NAC unit tests" \
+ --title "ndn-nac unit tests" \
build/coverage.info
fi
diff --git a/.jenkins.d/README.md b/.jenkins.d/README.md
index 5813349..e8dbf37 100644
--- a/.jenkins.d/README.md
+++ b/.jenkins.d/README.md
@@ -1,36 +1,28 @@
-CONTINUOUS INTEGRATION SCRIPTS
-==============================
+# CONTINUOUS INTEGRATION SCRIPTS
-Environment Variables Used in Build Scripts
--------------------------------------------
+## Environment Variables Used in Build Scripts
-- `NODE_LABELS`: the variable defines a list of OS properties. The set values are used by the
- build scripts to select proper behavior for different OS.
+- `NODE_LABELS`: space-separated list of platform properties. The included values are used by
+ the build scripts to select the proper behavior for different operating systems and versions.
- The list should include at least `[OS_TYPE]`, `[DISTRO_TYPE]`, and `[DISTRO_VERSION]`.
+ The list should normally contain `[OS_TYPE]`, `[DISTRO_TYPE]`, and `[DISTRO_VERSION]`.
- Possible values for Linux:
+ Example values:
- * `[OS_TYPE]`: `Linux`
- * `[DISTRO_TYPE]`: `Ubuntu`
- * `[DISTRO_VERSION]`: `Ubuntu-16.04`, `Ubuntu-18.04`
+ - `[OS_TYPE]`: `Linux`, `OSX`
+ - `[DISTRO_TYPE]`: `Ubuntu`, `CentOS`
+ - `[DISTRO_VERSION]`: `Ubuntu-16.04`, `Ubuntu-18.04`, `CentOS-8`, `OSX-10.14`, `OSX-10.15`
- Possible values for OS X / macOS:
-
- * `[OS_TYPE]`: `OSX`
- * `[DISTRO_TYPE]`: `OSX` (can be absent)
- * `[DISTRO_VERSION]`: `OSX-10.11`, `OSX-10.12`, `OSX-10.13`
-
-- `JOB_NAME`: optional variable to define type of the job. Depending on the defined job type,
+- `JOB_NAME`: optional variable that defines the type of build job. Depending on the job type,
the build scripts can perform different tasks.
Possible values:
- * empty: default build process
- * `code-coverage` (Ubuntu Linux is assumed): debug build with tests and code coverage analysis
- * `limited-build`: only a single debug build with tests
+ - empty: default build task
+ - `code-coverage`: debug build with tests and code coverage analysis (Ubuntu Linux is assumed)
+ - `limited-build`: only a single debug build with tests
-- `CACHE_DIR`: the variable defines a path to folder containing cached files from previous builds,
- e.g., a compiled version of ndn-cxx library. If not set, `/tmp` is used.
+- `CACHE_DIR`: directory containing cached files from previous builds, e.g., a compiled version
+ of ndn-cxx. If not set, `/tmp` is used.
-- `WAF_JOBS`: number of parallel build jobs used by waf, defaults to 1.
+- `WAF_JOBS`: number of parallel build threads used by waf, defaults to 1.
diff --git a/.jenkins.d/util.sh b/.jenkins.d/util.sh
index 8ddc4ba..8077a74 100644
--- a/.jenkins.d/util.sh
+++ b/.jenkins.d/util.sh
@@ -16,6 +16,7 @@
set ${saved_xtrace}
return ${ret}
}
+export -f has
sudo_preserve_env() {
local saved_xtrace
@@ -35,3 +36,4 @@
set ${saved_xtrace}
sudo env "${vars[@]}" "$@"
}
+export -f sudo_preserve_env
diff --git a/.mailmap b/.mailmap
new file mode 100644
index 0000000..7345b69
--- /dev/null
+++ b/.mailmap
@@ -0,0 +1 @@
+<davidepesa@gmail.com> <davide.pesavento@lip6.fr>
diff --git a/.waf-tools/sphinx_build.py b/.waf-tools/sphinx_build.py
index e61da6e..b44a54f 100644
--- a/.waf-tools/sphinx_build.py
+++ b/.waf-tools/sphinx_build.py
@@ -44,28 +44,28 @@
task.inputs.append(conf)
confdir = conf.parent.abspath()
- buildername = getattr(self, "builder", "html")
- srcdir = getattr(self, "srcdir", confdir)
- outdir = self.path.find_or_declare(getattr(self, "outdir", buildername)).get_bld()
- doctreedir = getattr(self, "doctreedir", os.path.join(outdir.abspath(), ".doctrees"))
+ buildername = getattr(self, 'builder', 'html')
+ srcdir = getattr(self, 'srcdir', confdir)
+ outdir = self.path.find_or_declare(getattr(self, 'outdir', buildername)).get_bld()
+ doctreedir = getattr(self, 'doctreedir', os.path.join(outdir.abspath(), '.doctrees'))
task.env['BUILDERNAME'] = buildername
task.env['SRCDIR'] = srcdir
task.env['DOCTREEDIR'] = doctreedir
task.env['OUTDIR'] = outdir.abspath()
- task.env['VERSION'] = "version=%s" % self.VERSION
- task.env['RELEASE'] = "release=%s" % self.VERSION
+ task.env['VERSION'] = 'version=%s' % self.version
+ task.env['RELEASE'] = 'release=%s' % getattr(self, 'release', self.version)
import imp
confData = imp.load_source('sphinx_conf', conf.abspath())
- if buildername == "man":
+ if buildername == 'man':
for i in confData.man_pages:
target = outdir.find_or_declare('%s.%d' % (i[1], i[4]))
task.outputs.append(target)
if self.install_path:
- self.bld.install_files("%s/man%d/" % (self.install_path, i[4]), target)
+ self.bld.install_files('%s/man%d/' % (self.install_path, i[4]), target)
else:
task.outputs.append(outdir)
diff --git a/README.md b/README.md
index 99cd7af..07e2330 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,22 @@
-# NAC: Named-Based Access Control
+# NAC: Named-Based Access Control Library for NDN
+![Language](https://img.shields.io/badge/C%2B%2B-14-blue.svg)
[![Build Status](https://travis-ci.org/named-data/name-based-access-control.svg?branch=new)](https://travis-ci.org/named-data/name-based-access-control)
-Please submit any bugs or issues to the NAC issue tracker:
-https://redmine.named-data.net/projects/nac/issues
+## Reporting bugs
+
+Please submit any bug reports or feature requests to the
+[NAC issue tracker](https://redmine.named-data.net/projects/nac/issues).
+
+## Contributing
+
+We greatly appreciate contributions to the NAC code base, provided that they are
+licensed under the LGPL 3.0+ or a compatible license (see below).
+If you are new to the NDN software community, please read the
+[Contributor's Guide](https://github.com/named-data/.github/blob/master/CONTRIBUTING.md)
+to get started.
+
+## License
+
+NAC is an open source project licensed under the LGPL version 3.
+See [`COPYING.md`](COPYING.md) for more information.
diff --git a/docs/conf.py b/docs/conf.py
index 13cc45a..1cf79b2 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,25 +1,53 @@
# -*- coding: utf-8 -*-
#
-import sys
-import os
-import re
+# Configuration file for the Sphinx documentation builder.
+#
+# This file only contains a selection of the most common options. For a full
+# list see the documentation:
+# http://www.sphinx-doc.org/en/master/config
+
+# -- Path setup --------------------------------------------------------------
# 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.
-sys.path.insert(0, os.path.abspath('.'))
+#
+# import os
+import sys
+# sys.path.insert(0, os.path.abspath('.'))
-# -- General configuration ------------------------------------------------
+
+# -- Project information -----------------------------------------------------
+
+project = u'NAC: Name-based Access Control library'
+copyright = u'Copyright © 2014-2020 Regents of the University of California.'
+author = u'Named Data Networking Project'
+
+# The short X.Y version
+#version = ''
+
+# The full version, including alpha/beta/rc tags
+#release = ''
+
+# 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 = '%Y-%m-%d'
+
+
+# -- General configuration ---------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
+#
+needs_sphinx = '1.1'
# 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.extlinks',
'sphinx.ext.todo',
- 'redmine_issue',
]
def addExtensionIfExists(extension):
@@ -27,202 +55,69 @@
__import__(extension)
extensions.append(extension)
except ImportError:
- sys.stderr.write("Extension '%s' in not available. "
+ sys.stderr.write("Extension '%s' not found. "
"Some documentation may not build correctly.\n" % extension)
- sys.stderr.write("To install, use \n"
- " sudo pip install %s\n" % extension.replace('.', '-'))
-if sys.version_info[0] >= 3:
- addExtensionIfExists('sphinxcontrib.doxylink')
-
-# sphinxcontrib.googleanalytics is currently not working with the latest version of Sphinx
-# if os.getenv('GOOGLE_ANALYTICS', None):
-# addExtensionIfExists('sphinxcontrib.googleanalytics')
-
-# 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'
+addExtensionIfExists('sphinxcontrib.doxylink')
# The master toctree document.
master_doc = 'index'
-# General information about the project.
-project = u'NAC: Name-Based Access Control library'
-copyright = u'Copyright (c) 2014-2018 Regents of the University of California.'
-
-# 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'
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path.
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 = []
-
-# If true, keep warnings as "system message" paragraphs in the built documents.
-#keep_warnings = False
-
-
-# -- Options for HTML output ----------------------------------------------
+# -- 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'
+#
html_theme = 'named_data_theme'
-# 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
-# "<project> v<release> 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
+html_theme_path = ['.']
# 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']
-# Add any extra paths that contain custom files (such as robots.txt or
-# .htaccess) here, relative to this directory. These files are copied
-# directly to the root of the documentation.
-#html_extra_path = []
-# 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 <link> 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 = ".html"
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'nac-docs'
-
-
-# -- Options for LaTeX output ---------------------------------------------
+# -- Options for LaTeX output ------------------------------------------------
latex_elements = {
-# The paper size ('letterpaper' or 'a4paper').
-#'papersize': 'letterpaper',
+ # The paper size ('letterpaper' or 'a4paper').
+ #
+ # 'papersize': 'letterpaper',
-# The font size ('10pt', '11pt' or '12pt').
-#'pointsize': '10pt',
+ # The font size ('10pt', '11pt' or '12pt').
+ #
+ # 'pointsize': '10pt',
-# Additional stuff for the LaTeX preamble.
-#'preamble': '',
+ # Additional stuff for the LaTeX preamble.
+ #
+ # 'preamble': '',
+
+ # Latex figure (float) alignment
+ #
+ # 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
- ('index', 'nac-docs.tex', u'NAC: Name-Based Access Control library',
- u'Named Data Networking Project', 'manual'),
+ ('index', 'nac-docs.tex', u'NAC: Name-based Access Control library',
+ author, '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 ---------------------------------------
+# -- Options for manual page output ------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
@@ -230,19 +125,15 @@
]
# If true, show URL addresses after external links.
-man_show_urls = True
+#man_show_urls = True
-# ---- Custom options --------
+# -- Custom options ----------------------------------------------------------
doxylink = {
- 'nac' : ('nac.tag', 'doxygen/'),
+ 'nac': ('nac.tag', 'doxygen/'),
}
-if os.getenv('GOOGLE_ANALYTICS', None):
- googleanalytics_id = os.environ['GOOGLE_ANALYTICS']
- googleanalytics_enabled = True
-
-# exclude_patterns = ['RELEASE_NOTES.rst']
-
-redmine_project_url = "https://redmine.named-data.net/"
+extlinks = {
+ 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #'),
+}
diff --git a/docs/doxygen.conf.in b/docs/doxygen.conf.in
index 33b1fba..a358236 100644
--- a/docs/doxygen.conf.in
+++ b/docs/doxygen.conf.in
@@ -1922,7 +1922,7 @@
NAC_PUBLIC_WITH_TESTS_ELSE_PROTECTED=protected \
NAC_PUBLIC_WITH_TESTS_ELSE_PRIVATE=private \
NAC_PROTECTED_WITH_TESTS_ELSE_PRIVATE=private \
- NAC_VIRTUAL_WITH_TESTS
+ NAC_VIRTUAL_WITH_TESTS=
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
@@ -1966,7 +1966,7 @@
# tag file that is based on the input files it reads. See section "Linking to
# external documentation" for more information about the usage of tag files.
-GENERATE_TAGFILE = ndn-cxx.tag
+GENERATE_TAGFILE = nac.tag
# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
# class index. If set to NO only the inherited external classes will be listed.
diff --git a/docs/redmine_issue.py b/docs/redmine_issue.py
deleted file mode 100644
index 0df2b1f..0000000
--- a/docs/redmine_issue.py
+++ /dev/null
@@ -1,70 +0,0 @@
-# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
-# Based on http://doughellmann.com/2010/05/09/defining-custom-roles-in-sphinx.html
-
-"""Integration of Sphinx with Redmine.
-"""
-
-from docutils import nodes, utils
-from docutils.parsers.rst.roles import set_classes
-
-def redmine_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
- """Link to a Redmine issue.
-
- Returns 2 part tuple containing list of nodes to insert into the
- document and a list of system messages. Both are allowed to be
- empty.
-
- :param name: The role name used in the document.
- :param rawtext: The entire markup snippet, with role.
- :param text: The text marked with the role.
- :param lineno: The line number where rawtext appears in the input.
- :param inliner: The inliner instance that called us.
- :param options: Directive options for customization.
- :param content: The directive content for customization.
- """
- try:
- issue_num = int(text)
- if issue_num <= 0:
- raise ValueError
- except ValueError:
- msg = inliner.reporter.error(
- 'Redmine issue number must be a number greater than or equal to 1; '
- '"%s" is invalid.' % text, line=lineno)
- prb = inliner.problematic(rawtext, rawtext, msg)
- return [prb], [msg]
- app = inliner.document.settings.env.app
- node = make_link_node(rawtext, app, 'issues', str(issue_num), options)
- return [node], []
-
-def make_link_node(rawtext, app, type, slug, options):
- """Create a link to a Redmine resource.
-
- :param rawtext: Text being replaced with link node.
- :param app: Sphinx application context
- :param type: Link type (issue, changeset, etc.)
- :param slug: ID of the thing to link to
- :param options: Options dictionary passed to role func.
- """
- #
- try:
- base = app.config.redmine_project_url
- if not base:
- raise AttributeError
- except AttributeError:
- raise ValueError('redmine_project_url configuration value is not set')
- #
- slash = '/' if base[-1] != '/' else ''
- ref = base + slash + type + '/' + slug + '/'
- set_classes(options)
- node = nodes.reference(rawtext, 'Issue #' + utils.unescape(slug), refuri=ref,
- **options)
- return node
-
-def setup(app):
- """Install the plugin.
-
- :param app: Sphinx application context.
- """
- app.add_role('issue', redmine_role)
- app.add_config_value('redmine_project_url', None, 'env')
- return
diff --git a/waf b/waf
index 7ceee16..a1c5c96 100755
--- a/waf
+++ b/waf
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# encoding: latin-1
# Thomas Nagy, 2005-2018
#
diff --git a/wscript b/wscript
index 8f95207..6d3946c 100644
--- a/wscript
+++ b/wscript
@@ -142,7 +142,8 @@
config='docs/conf.py',
outdir='docs',
source=bld.path.ant_glob('docs/**/*.rst'),
- VERSION=VERSION)
+ version=VERSION_BASE,
+ release=VERSION)
def version(ctx):
# don't execute more than once