#!/usr/bin/python3 # Copyright (C) 2017-2018 Lars Wirzenius # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . from distutils.core import setup from distutils.command.build import build import glob import cliapp import ick2 class Build(build): def run(self): super().run() self.build_manpage('icktool') def build_manpage(self, program): source = '{}.1.in'.format(program) filename = '{}.1'.format(program) argv = [ './{}'.format(program), '--generate-manpage={}'.format(source), ] with open(filename, 'w') as manpage: cliapp.runcmd(argv, stdout=manpage) setup( name='ick2', version=ick2.__version__, description='CI server', author='Lars Wirzenius', author_email='liw@liw.fi', url='http://liw.fi/ick/', py_modules=[ 'ick_controller', 'artifact_store', 'notification_service', ], packages=['ick2'], scripts=[ 'create-token', 'start_ick', 'start_artifact_store', 'start_notification_service', 'icktool', 'worker_manager' ], data_files=[('share/man/man1', glob.glob('*.1'))], cmdclass={ 'build': Build, } )