summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorRadostin Stoyanov <rstoyanov1@gmail.com>2017-08-26 21:42:15 +0100
committerRadostin Stoyanov <rstoyanov1@gmail.com>2017-08-28 17:02:29 +0100
commit9e6a003a8d2f72f3db09404b726c4abad5316e29 (patch)
tree4ae70df734e5214851e467f5cf3a5ab4eddb686b /setup.py
parentdcbdf5bea0350d59d490c2f199e8201ca1ef7d68 (diff)
downloadvirt-bootstrap.git-9e6a003a8d2f72f3db09404b726c4abad5316e29.tar.gz
virt-bootstrap.git-9e6a003a8d2f72f3db09404b726c4abad5316e29.tar.xz
virt-bootstrap.git-9e6a003a8d2f72f3db09404b726c4abad5316e29.zip
Add man page for virt-bootstrap
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 0f617e4..bca9955 100755
--- a/setup.py
+++ b/setup.py
@@ -11,6 +11,7 @@ import os
import sys
import subprocess
import setuptools
+from setuptools.command.install import install
# pylint: disable=import-error, wrong-import-position
sys.path.insert(0, 'src') # noqa: E402
@@ -26,6 +27,27 @@ def read(fname):
return fobj.read()
+class PostInstallCommand(install):
+ """
+ Post-installation commands.
+ """
+ def run(self):
+ """
+ Post install script
+ """
+ cmd = [
+ 'pod2man',
+ '--center=Container bootstrapping tool',
+ '--name=VIRT-BOOTSTRAP',
+ '--release=%s' % virtBootstrap.__version__,
+ 'man/virt-bootstrap.pod',
+ 'man/virt-bootstrap.1'
+ ]
+ if subprocess.call(cmd) != 0:
+ raise RuntimeError("Building man pages has failed")
+ install.run(self)
+
+
class CheckPylint(setuptools.Command):
"""
Check python source files with pylint and pycodestyle.
@@ -114,9 +136,14 @@ setuptools.setup(
],
cmdclass={
+ 'install': PostInstallCommand,
'pylint': CheckPylint
},
+ data_files=[
+ ("share/man/man1", ['man/virt-bootstrap.1'])
+ ],
+
tests_require=['mock>=2.0'],
extras_require={