summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
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={