53 lines
1.6 KiB
Diff
53 lines
1.6 KiB
Diff
From 5a18aeb49c357a16c138d37a8251d73d8ed35319 Mon Sep 17 00:00:00 2001
|
|
From: Viktor Ashirov <vashirov@redhat.com>
|
|
Date: Tue, 18 Jan 2022 13:24:53 +0100
|
|
Subject: [PATCH] Issue 5115 - AttributeError: type object 'build_manpages'
|
|
has no attribute 'build_manpages'
|
|
|
|
Bug Description:
|
|
Starting from v2.1, argparse-manpage provides methods build_manpages,
|
|
get_build_py_cmd and get_install_cmd in the top-level module.
|
|
This breaks installation of lib389 on systems with the newer version
|
|
of argparse-manpage.
|
|
|
|
Fix Description:
|
|
Update setup.py to be aware of the module version and import methods
|
|
based on it.
|
|
|
|
Fixes: https://github.com/389ds/389-ds-base/issues/5115
|
|
|
|
Reviewed by: @tbordaz, @mreynolds389 (Thanks!)
|
|
---
|
|
src/lib389/setup.py | 8 +++++---
|
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/lib389/setup.py b/src/lib389/setup.py
|
|
index cadec25..5974d2c 100644
|
|
--- a/src/lib389/setup.py
|
|
+++ b/src/lib389/setup.py
|
|
@@ -14,7 +14,9 @@
|
|
|
|
from setuptools import setup, find_packages
|
|
from os import path
|
|
-from build_manpages import build_manpages
|
|
+import build_manpages as bm
|
|
+if bm.__version__ < '2.1':
|
|
+ from build_manpages import build_manpages as bm
|
|
from setuptools.command.build_py import build_py
|
|
|
|
here = path.abspath(path.dirname(__file__))
|
|
@@ -89,8 +91,8 @@ setup(
|
|
|
|
cmdclass={
|
|
# Dynamically build man pages for cli tools
|
|
- 'build_manpages': build_manpages.build_manpages,
|
|
- 'build_py': build_manpages.get_build_py_cmd(build_py),
|
|
+ 'build_manpages': bm.build_manpages,
|
|
+ 'build_py': bm.get_build_py_cmd(build_py),
|
|
}
|
|
|
|
)
|
|
--
|
|
2.27.0
|
|
|