From a49d1aa4fda79cbffb8483638820109df7dcebb4 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 12 Apr 2017 17:08:34 +0900 Subject: 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 --- setup.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'setup.py') 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', -- cgit v1.2.1