Re: [PATCH 216/216] Use sphinx.version_info directly instead of parsing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(What's with the subject [PATCH 216/216], I luckily only saw one patch.)

On Mon, 20 Mar 2017, Remy Leone <remy.leone@xxxxxxxx> wrote:
> From: Rémy Léone <remy.leone@xxxxxxxxx>
>
> Using the development version of sphinx caused the parsing of the
> version to fail.
>
> Signed-off-by: Rémy Léone <remy.leone@xxxxxxxxx>
> ---
>  Documentation/conf.py           | 2 +-
>  Documentation/sphinx/cdomain.py | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/conf.py b/Documentation/conf.py
> index 7fadb3b..9e9dfa1 100644
> --- a/Documentation/conf.py
> +++ b/Documentation/conf.py
> @@ -17,7 +17,7 @@ import os
>  import sphinx
>  
>  # Get Sphinx version
> -major, minor, patch = map(int, sphinx.__version__.split("."))
> +major, minor, patch, _, _ = sphinx.version_info

sphinx.version_info was introduced in Sphinx 1.2, so this change should
be accompanied with

diff --git a/Documentation/conf.py b/Documentation/conf.py
index f2b916158377..00ae12861a96 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -29,7 +29,7 @@ from load_config import loadConfig
 # -- General configuration ------------------------------------------------
 
 # If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
+needs_sphinx = '1.2'
 
 # Add any Sphinx extension module names here, as strings. They can be
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom

---

I suppose we can require 1.2 or later.


BR,
Jani.

>  
>  
>  # If extensions (or modules to document with autodoc) are in another directory,
> diff --git a/Documentation/sphinx/cdomain.py b/Documentation/sphinx/cdomain.py
> index df0419c..984e327 100644
> --- a/Documentation/sphinx/cdomain.py
> +++ b/Documentation/sphinx/cdomain.py
> @@ -44,7 +44,7 @@ from sphinx.domains.c import CDomain as Base_CDomain
>  __version__  = '1.0'
>  
>  # Get Sphinx version
> -major, minor, patch = map(int, sphinx.__version__.split("."))
> +major, minor, patch, _, _ = sphinx.version_info
>  
>  def setup(app):

-- 
Jani Nikula, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux