guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: python-pbr: Support python-sphinx>=1.2.1.


From: Danny Milosavljevic
Subject: 01/01: gnu: python-pbr: Support python-sphinx>=1.2.1.
Date: Sat, 18 Feb 2017 10:46:33 -0500 (EST)

dannym pushed a commit to branch python-tests
in repository guix.

commit a1e3ed6e8b57c1920d01e357fb2a8e545d4acc33
Author: Danny Milosavljevic <address@hidden>
Date:   Sat Feb 18 16:43:37 2017 +0100

    gnu: python-pbr: Support python-sphinx>=1.2.1.
    
    * gnu/packages/patches/python-pbr-fix-man-page-support.patch: New file.
    * gnu/packages/python.scm (python-pbr-minimal): Use the new patch file.
---
 .../patches/python-pbr-fix-man-page-support.patch  | 28 ++++++++++++++++++++++
 gnu/packages/python.scm                            |  3 ++-
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/patches/python-pbr-fix-man-page-support.patch 
b/gnu/packages/patches/python-pbr-fix-man-page-support.patch
new file mode 100644
index 0000000..b9036f5
--- /dev/null
+++ b/gnu/packages/patches/python-pbr-fix-man-page-support.patch
@@ -0,0 +1,28 @@
+See: https://bugs.launchpad.net/oslosphinx/+bug/1661861
+diff -ur orig/pbr-1.10.0/pbr/builddoc.py pbr-1.10.0/pbr/builddoc.py
+--- orig/pbr-1.10.0/pbr/builddoc.py    2016-05-23 21:38:18.000000000 +0200
++++ pbr-1.10.0/pbr/builddoc.py 2017-02-18 14:01:37.424434317 +0100
+@@ -138,7 +138,8 @@
+             sphinx_config.init_values(warnings.warn)
+         else:
+             sphinx_config.init_values()
+-        if self.builder == 'man' and len(sphinx_config.man_pages) == 0:
++        if self.builder == 'man' and len(
++                getattr(sphinx_config, 'man_pages', '')) == 0:
+             return
+         app = application.Sphinx(
+             self.source_dir, self.config_dir,
+diff -ur orig/pbr-1.10.0/pbr/util.py pbr-1.10.0/pbr/util.py
+--- orig/pbr-1.10.0/pbr/util.py        2016-05-23 21:38:18.000000000 +0200
++++ pbr-1.10.0/pbr/util.py     2017-02-18 15:36:32.951196795 +0100
+@@ -211,7 +211,9 @@
+     parser.read(path)
+     config = {}
+     for section in parser.sections():
+-        config[section] = dict(parser.items(section))
++        config[section] = dict()
++        for k, value in parser.items(section):
++            config[section][k.replace('-', '_')] = value
+ 
+     # Run setup_hooks, if configured
+     setup_hooks = has_get_option(config, 'global', 'setup_hooks')
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 5bcdc6d..93e18b2 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -2130,7 +2130,8 @@ protocol.")
        (uri (pypi-uri "pbr" version))
        (sha256
         (base32
-         "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))))
+         "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
+       (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
     (build-system python-build-system)
     (arguments
      `(#:tests? #f))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]