From e2a6506d08a03a0106d038f8108f1f2813e4aa9c Mon Sep 17 00:00:00 2001 From: stefan Date: Thu, 12 Mar 2009 14:27:20 +0000 Subject: [PATCH] Move man pages into 'share/man/man1' and simplify setup.py git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4188 57a73879-2fb5-44c3-a270-3262357dd7e2 --- setup.py | 44 ++++++++---------------- {doc => share/man/man1}/roundup-admin.1 | 0 {doc => share/man/man1}/roundup-demo.1 | 0 {doc => share/man/man1}/roundup-mailgw.1 | 0 {doc => share/man/man1}/roundup-server.1 | 0 5 files changed, 14 insertions(+), 30 deletions(-) rename {doc => share/man/man1}/roundup-admin.1 (100%) rename {doc => share/man/man1}/roundup-demo.1 (100%) rename {doc => share/man/man1}/roundup-mailgw.1 (100%) rename {doc => share/man/man1}/roundup-server.1 (100%) diff --git a/setup.py b/setup.py index e2e226d..f1f247b 100644 --- a/setup.py +++ b/setup.py @@ -52,11 +52,8 @@ def scriptname(path): return script def main(): - # build list of scripts from their implementation modules - roundup_scripts = map(scriptname, glob('roundup/scripts/[!_]*.py')) - # template munching - packagelist = [ + packages = [ 'roundup', 'roundup.anypy', 'roundup.cgi', @@ -66,44 +63,31 @@ def main(): 'roundup.backends', 'roundup.scripts', ] - installdatafiles = [ - ('share/roundup/cgi-bin', ['frontends/roundup.cgi']), - ] py_modules = ['roundup.demo',] + # build list of scripts from their implementation modules + scripts = [scriptname(f) for f in glob('roundup/scripts/[!_]*.py')] + + data_files = [ + ('share/roundup/cgi-bin', ['frontends/roundup.cgi']), + ] # install man pages on POSIX platforms if os.name == 'posix': - installdatafiles.append(('man/man1', ['doc/roundup-admin.1', - 'doc/roundup-mailgw.1', 'doc/roundup-server.1', - 'doc/roundup-demo.1'])) + data_files.append(include('share/man/man1', '*')) # add the templates to the data files lists from roundup.init import listTemplates templates = [t['path'] for t in listTemplates(os.path.join('share','roundup','templates')).values()] for tdir in templates: - # scan for data files for idir in '. detectors extensions html'.split(): - idir = os.path.join(tdir, idir) - if not os.path.isdir(idir): - continue - tfiles = [] - for f in os.listdir(idir): - if f.startswith('.'): - continue - ifile = os.path.join(idir, f) - if os.path.isfile(ifile): - tfiles.append(ifile) - installdatafiles.append( - (os.path.join('share', 'roundup', idir), tfiles) - ) + data_files.append(include(os.path.join(tdir, idir), '*')) # add message files for (_dist_file, _mo_file) in list_message_files(): - installdatafiles.append((os.path.dirname(_mo_file), - [os.path.join("build", _mo_file)])) + data_files.append((os.path.dirname(_mo_file), [os.path.join("build", _mo_file)])) # add docs - installdatafiles.append(include(os.path.join('share', 'doc', 'roundup', 'html'), '*')) + data_files.append(include(os.path.join('share', 'doc', 'roundup', 'html'), '*')) # perform the setup action from roundup import __version__ @@ -140,10 +124,10 @@ with command-line, web and e-mail interfaces. Highly customisable.""", 'build': build, 'bdist_rpm': bdist_rpm, }, - packages=packagelist, + packages=packages, py_modules=py_modules, - scripts=roundup_scripts, - data_files=installdatafiles) + scripts=scripts, + data_files=data_files) if __name__ == '__main__': main() diff --git a/doc/roundup-admin.1 b/share/man/man1/roundup-admin.1 similarity index 100% rename from doc/roundup-admin.1 rename to share/man/man1/roundup-admin.1 diff --git a/doc/roundup-demo.1 b/share/man/man1/roundup-demo.1 similarity index 100% rename from doc/roundup-demo.1 rename to share/man/man1/roundup-demo.1 diff --git a/doc/roundup-mailgw.1 b/share/man/man1/roundup-mailgw.1 similarity index 100% rename from doc/roundup-mailgw.1 rename to share/man/man1/roundup-mailgw.1 diff --git a/doc/roundup-server.1 b/share/man/man1/roundup-server.1 similarity index 100% rename from doc/roundup-server.1 rename to share/man/man1/roundup-server.1 -- 2.30.2