build: switch to python3

Refs: #5095
Change-Id: Iedc107d41d4832682071986678b015980354786d
diff --git a/docs/INSTALL.rst b/docs/INSTALL.rst
index 4156a5e..aa43bd6 100644
--- a/docs/INSTALL.rst
+++ b/docs/INSTALL.rst
@@ -24,7 +24,7 @@
 -  Fedora >= 24
 -  Gentoo Linux
 -  Raspbian >= 2017-08-16
--  FreeBSD 11.2
+-  FreeBSD >= 11.3
 
 Prerequisites
 -------------
@@ -33,20 +33,31 @@
 ~~~~~~~~~
 
 -  GCC >= 5.3, or clang >= 3.6
--  ``python2`` >= 2.7, or ``python3`` >= 3.4
--  Boost libraries >= 1.58
+-  Python >= 3.5
 -  ``pkg-config``
--  SQLite 3.x
+-  Boost >= 1.58
 -  OpenSSL >= 1.0.2
--  Apple Security framework (on macOS only)
+-  SQLite 3.x
 
-Following are the detailed steps for each platform to install the compiler, all necessary
-development tools and libraries, and ndn-cxx prerequisites.
+Following are the detailed steps for each platform to install the compiler and all necessary
+development tools and libraries that are required to build ndn-cxx from source.
+
+- Ubuntu
+
+    In a terminal, enter::
+
+        sudo apt install build-essential pkg-config python3-minimal libboost-all-dev libssl-dev libsqlite3-dev
+
+- Fedora
+
+    In a terminal, enter::
+
+        sudo yum install gcc-g++ boost-devel openssl-devel sqlite-devel
 
 - macOS
 
-    * Install Xcode from the App Store, or at least the Command Line Tools
-      (``xcode-select --install``)
+    * Install either Xcode (from the App Store) or the Command Line Tools
+      (with ``xcode-select --install``)
 
     * If using Homebrew (recommended), enter the following in a terminal::
 
@@ -57,23 +68,11 @@
         If a major OS upgrade is performed after installing the dependencies
         with Homebrew, remember to reinstall all packages.
 
-- Ubuntu
-
-    In a terminal, enter::
-
-        sudo apt install build-essential libboost-all-dev libssl-dev libsqlite3-dev pkg-config python-minimal
-
-- Fedora
-
-    In a terminal, enter::
-
-        sudo yum install gcc-g++ sqlite-devel boost-devel openssl-devel
-
 - FreeBSD
 
     In a terminal, enter::
 
-        sudo pkg install python pkgconf sqlite3 boost-libs
+        sudo pkg install pkgconf python3 boost-libs openssl sqlite3
 
 Optional:
 ~~~~~~~~~
@@ -83,15 +82,10 @@
 
 -  ``doxygen``
 -  ``graphviz``
--  ``python-sphinx``
+-  ``sphinx``
 -  ``sphinxcontrib-doxylink``
 
-The following lists steps for common platforms to install these prerequisites:
-
-- On macOS with Homebrew and pip::
-
-    brew install doxygen graphviz
-    sudo pip install sphinx sphinxcontrib-doxylink
+The following lists the steps to install these prerequisites on various common platforms.
 
 - On Ubuntu::
 
@@ -103,9 +97,14 @@
     sudo yum install doxygen graphviz python-sphinx
     sudo pip install sphinxcontrib-doxylink
 
+- On macOS::
+
+    brew install doxygen graphviz
+    sudo pip install sphinx sphinxcontrib-doxylink
+
 - On FreeBSD::
 
-    sudo pkg install doxygen graphviz py27-sphinx
+    sudo pkg install doxygen graphviz py37-sphinx
 
 
 .. _build:
diff --git a/docs/conf.py b/docs/conf.py
index 7e73680..2e3a1df 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -58,12 +58,7 @@
         sys.stderr.write("Extension '%s' not found. "
                          "Some documentation may not build correctly.\n" % extension)
 
-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')
+addExtensionIfExists('sphinxcontrib.doxylink')
 
 # The master toctree document.
 master_doc = 'index'
@@ -157,7 +152,3 @@
 extlinks = {
     'issue': ('https://redmine.named-data.net/issues/%s', 'issue #'),
 }
-
-if os.getenv('GOOGLE_ANALYTICS', None):
-    googleanalytics_id = os.environ['GOOGLE_ANALYTICS']
-    googleanalytics_enabled = True
diff --git a/docs/release-notes/release-notes-0.2.0.rst b/docs/release-notes/release-notes-0.2.0.rst
index 0a8c10f..26ab722 100644
--- a/docs/release-notes/release-notes-0.2.0.rst
+++ b/docs/release-notes/release-notes-0.2.0.rst
@@ -10,16 +10,16 @@
 
 - **Base**
 
-  + The license under which the library is released is changed to **Lesser GNU Public
-    License version 3.0**.
+  + The license under which the library is released is changed to the **GNU Lesser
+    General Public License version 3.0**
 
   + New ways to use incoming Interest dispatching:
 
     * New :ndn-cxx:`InterestFilter` abstraction that supports filtering based on name
       prefixes and regular expressions.
 
-    * Separated :ndn-cxx:`Face::registerPrefix()` and :ndn-cxx:`Face::setInterestFilter()`
-      methods allow distinct operations of registering with the local NDN forwarder and setting
+    * Separate ``Face::registerPrefix()`` and ``Face::setInterestFilter()`` methods
+      allow distinct operations of registering with the local NDN forwarder and setting
       up application-specific ``OnInterest`` call dispatch using InterestFilters.
 
   + Add support for new `NDN naming conventions
@@ -41,22 +41,21 @@
 
 - **Wire encoding**
 
-  + :ndn-cxx:`Data::getFullName() <getFullName()>` method to get :ndn-cxx:`Data` packet
-    name with implicit digest
+  + ``Data::getFullName()`` method to get the Data packet name including the implicit digest
 
-  + New :ndn-cxx:`Name::getSuccessor()` method to get name successor (:issue:`1677`)
+  + ``Name::getSuccessor()`` method to get name successor (:issue:`1677`)
 
   + New in-wire refreshing of Interest's nonce (:issue:`1758`)
 
 - **Management**
 
-  + Support for :ndn-cxx:`ChannelStatus`, :ndn-cxx:`StrategyChoice` datasets
+  + Support for :ndn-cxx:`ChannelStatus` and :ndn-cxx:`StrategyChoice` datasets
 
   + Defining new common Route Origins for NFD RIB management protocol (:issue:`1719`)
 
-  + New RibEntry and Route data structures for RIB management protocol (:issue:`1764`)
+  + New ``RibEntry`` and ``Route`` data structures for RIB management protocol (:issue:`1764`)
 
-  + Add support for RIB flags for setInterestFilter and registerPrefix (:issue:`1842`)
+  + Add support for RIB flags in ``setInterestFilter()`` and ``registerPrefix()`` (:issue:`1842`)
 
 - **Miscellaneous tools**
 
@@ -71,7 +70,7 @@
 
 - **Build**
 
-  + enabled support of precompiled headers for clang and gcc compilers to speed up compilation
+  + Enabled support of precompiled headers for clang and gcc compilers to speed up compilation
 
 Updates and bug fixes:
 ^^^^^^^^^^^^^^^^^^^^^^
@@ -84,13 +83,13 @@
     :ndn-cxx:`Face::put` methods (:issue:`1774`)
 
   + Cleaning up transport state on communication failure, so Face can try to reconnect
-    in the future.
+    in the future
 
-  + Fix bug with Face::removePendingInterest (:issue:`1917`)
+  + Fix bug in ``Face::removePendingInterest`` (:issue:`1917`)
 
 - **Wire encoding**
 
-  + Nonce field is now encoded as 4-byte uint8_t value, as defined by NDN-TLV spec.
+  + The Nonce field is now encoded as a 4-byte value, as defined by NDN-TLV spec
 
   + Optimized Data packet signing
 
@@ -104,27 +103,27 @@
 
 - **Management**
 
-  + Add link-layer byte counts in FaceStatus data structure (:issue:`1765`)
+  + Add link-layer byte counts in ``FaceStatus`` data structure (:issue:`1765`)
 
 - **Security**
 
   + Allow user to explicitly specify the cert name prefix before 'KEY' component in
     ``ndnsec-certgen``
 
-  + ``SignatureSha256`` has been renamed to :ndn-cxx:`DigestSha256` to conform with
-    `NDN-TLV specification <http://named-data.net/doc/ndn-tlv/>`_.
+  + ``SignatureSha256`` has been renamed to :ndn-cxx:`DigestSha256` to conform to
+    `NDN-TLV specification <http://named-data.net/doc/ndn-tlv/>`_
 
-  + Add checking of ``Timestamp`` and ``Nonce`` fields in signed Interest within
+  + Add checking of Timestamp and Nonce fields in signed Interest within
     :ndn-cxx:`ValidatorConfig`
 
-  + Allow validator customization using hooks:
+  + Allow validator customization using hooks.
 
     Sub-classes of :ndn-cxx:`Validator` class can use the following hooks to fine-tune the
     validation process:
 
-      * ``preCertificateValidation`` to process received certificate before validation.
+      * ``preCertificateValidation`` to process received certificate before validation
       * ``onTimeout`` to process interest timeout
-      * ``afterCheckPolicy`` to process validation requests.
+      * ``afterCheckPolicy`` to process validation requests
 
   + Fix memory issues in ``SecPublicInfoSqlite3``
 
@@ -164,7 +163,7 @@
 Removed:
 ^^^^^^^^
 
-- support of ndnd-tlv (only NFD management protocol is supported now)
+- Support for ndnd-tlv (only NFD management protocol is supported now)
 
 - ``SecPublicInfoMemory`` and ``SecTpmMemory`` classes that were no longer used
 
diff --git a/docs/release-notes/release-notes-0.6.1.rst b/docs/release-notes/release-notes-0.6.1.rst
index 2770915..c1f5a4f 100644
--- a/docs/release-notes/release-notes-0.6.1.rst
+++ b/docs/release-notes/release-notes-0.6.1.rst
@@ -13,50 +13,40 @@
 - New signal in :ndn-cxx:`SegmentFetcher` to notify retrieval of Data segments
   (:issue:`4438`)
 
-- Initial support for the Content Store management protocol
-  (:issue:`4050`)
+- Initial support for the Content Store management protocol (:issue:`4050`)
 
 - Literal operators for ``time::duration`` types, such as ``1_s``, ``42_ms``, ``30_days``
   (:issue:`4468`)
 
 - Support for BLAKE2 hash function (requires OpenSSL >= 1.1.0)
 
-- A ``escape()`` helper function complementing the existing ``unescape()`` (:issue:`4484`)
+- An ``escape()`` helper function complementing the existing ``unescape()`` (:issue:`4484`)
 
 Improvements and bug fixes
 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 - ``ndnsec key-gen`` command line now allows customization of key ID (:issue:`4294`)
 
-- Fixed encoding of ``'~'`` and ``'+'`` in :ndn-cxx:`Component::toUri()`
-  (:issue:`4484`)
+- Fixed encoding of ``'~'`` and ``'+'`` in ``name::Component::toUri()`` (:issue:`4484`)
 
-- Fixed handling of large dates when converting to/from string
-  (:issue:`4478`, :issue:`3915`)
+- Fixed handling of large dates when converting to/from string (:issue:`4478`, :issue:`3915`)
 
-- Fixed error handling in :ndn-cxx:`KeyChain::importSafeBag()`
-  (:issue:`4359`)
+- Fixed error handling in ``KeyChain::importSafeBag()`` (:issue:`4359`)
 
-- Fixed parsing of IPv6 addresses with scope-id
-  (:issue:`4474`)
+- Fixed parsing of IPv6 addresses with scope-id (:issue:`4474`)
 
-- :ndn-cxx:`io::load()` now handles empty files properly
-  (:issue:`4434`)
+- ``io::load()`` now handles empty files properly (:issue:`4434`)
 
-- Switched to using `boost::asio::basic_waitable_timer`
-  (:issue:`4431`)
+- Switched to using ``boost::asio::basic_waitable_timer`` (:issue:`4431`)
 
-- Allow linking multiple :ndn-cxx:`DummyClientFace` instances together to emulate a broadcast medium
-  (:issue:`3913`)
+- Allow linking multiple :ndn-cxx:`DummyClientFace` instances together to emulate a broadcast
+  medium (:issue:`3913`)
 
-- Fixed build when ``std::to_string`` is not available
-  (:issue:`4393`)
+- Fixed build when ``std::to_string`` is not available (:issue:`4393`)
 
-- Avoid undefined behavior when casting to :ndn-cxx:`tlv::SignatureTypeValue`
-  (:issue:`4370`)
+- Avoid undefined behavior when casting to :ndn-cxx:`tlv::SignatureTypeValue` (:issue:`4370`)
 
-- Fixed compilation with Boost 1.66.0
-  (:issue:`4422`)
+- Fixed compilation with Boost 1.66.0 (:issue:`4422`)
 
 - Various documentation updates
   (:issue:`3918`, :issue: `4184`, :issue: `4275`)
@@ -64,6 +54,4 @@
 Removed
 ^^^^^^^
 
-- Removed obsolete TLV-TYPE constants
-  (:issue:`4055`, :issue:`3098`, :issue: `3755`)
-
+- Removed obsolete TLV-TYPE constants (:issue:`4055`, :issue:`3098`, :issue: `3755`)