summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-04-12 17:08:34 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-04-13 18:42:43 +0900
commita49d1aa4fda79cbffb8483638820109df7dcebb4 (patch)
treed28f299690d926016461f932a2094f764a29808d /setup.py
parenta7406d86cd7d7a4e5e9273689eeabb8b51632b18 (diff)
downloadbuildstream-a49d1aa4fda79cbffb8483638820109df7dcebb4.tar.gz
Adding man pages to distribution
Man pages are automatically generated but unfortunately committed to the repository, this should be fixed by integrating the man page generation as a part of the build step, but this seems to be very difficult and is not well documented at all. Tip: The man_pages module of click_man implements a distutils.core.Command for generating man pages, this command should be run as a part of setup.py
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index d932b4ed8..e9123c058 100755
--- a/setup.py
+++ b/setup.py
@@ -71,12 +71,34 @@ except AttributeError:
exit_ostree("OSTree too old")
+###########################################
+# List the pre-built man pages to install #
+###########################################
+#
+# Man pages are automatically generated however it was too difficult
+# to integrate with setuptools as a step of the build (FIXME !).
+#
+# To update the man pages in tree before a release, you need to
+# ensure you have the 'click_man' package installed, and run:
+#
+# python3 setup.py --command-packages=click_man.commands man_pages
+#
+# Then commit the result.
+#
+def list_man_pages():
+ bst_dir = os.path.dirname(os.path.abspath(__file__))
+ man_dir = os.path.join(bst_dir, 'man')
+ man_pages = os.listdir(man_dir)
+ return [os.path.join('man', page) for page in man_pages]
+
+
setup(name='BuildStream',
version='0.1',
description='A framework for modelling build pipelines in YAML',
license='LGPL',
packages=find_packages(),
package_data={'buildstream': ['plugins/*/*.py', 'plugins/*/*.yaml', 'data/*.yaml']},
+ data_files=[('man/man1', list_man_pages())],
install_requires=[
'setuptools',
'psutil',