X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=setup.py;h=cf3e2e22a9afcc13502b3ec8cdbd11c5e4d6f877;hb=c0026a5d4d96598367fe243fae81633309de976a;hp=5c4deff5b137c7eb3534859e6f8cf741677a2165;hpb=53d19a1fdecf93fb13a7de18cf2a0e617bb186ba;p=roundup.git diff --git a/setup.py b/setup.py index 5c4deff..cf3e2e2 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: setup.py,v 1.32 2002-03-27 23:47:58 jhermann Exp $ +# $Id: setup.py,v 1.36 2002-08-16 04:25:01 richard Exp $ from distutils.core import setup, Extension from distutils.util import get_platform @@ -25,7 +25,7 @@ from distutils.command.build_scripts import build_scripts import sys, os, string from glob import glob -from roundup.templatebuilder import makeHtmlBase +from roundup.templates.builder import makeHtmlBase ############################################################################# @@ -112,8 +112,6 @@ def scriptname(path): script = script + ".bat" return script -# build list of scripts from their implementation modules -roundup_scripts = map(scriptname, glob('roundup/scripts/[!_]*.py')) ############################################################################# @@ -124,55 +122,94 @@ def isTemplateDir(dir): return dir[0] != '.' and dir != 'CVS' and os.path.isdir(dir) \ and os.path.isfile(os.path.join(dir, '__init__.py')) +# use that function to list all the templates templates = map(os.path.basename, filter(isTemplateDir, glob(os.path.join('roundup', 'templates', '*')))) -packagelist = [ - 'roundup', - 'roundup.backends', - 'roundup.scripts', - 'roundup.templates' -] -installdatafiles = [ - ('share/roundup/cgi-bin', ['cgi-bin/roundup.cgi']), -] - -for template in templates: - tdir = os.path.join('roundup', 'templates', template) - makeHtmlBase(tdir) - - # add the template package and subpackage - packagelist.append('roundup.templates.%s' % template) - packagelist.append('roundup.templates.%s.detectors' % template) - - # scan for data files - tfiles = glob(os.path.join(tdir, 'html', '*')) - tfiles = filter(os.path.isfile, tfiles) - installdatafiles.append( - ('share/roundup/templates/%s/html' % template, tfiles) - ) - - -setup( - name = "roundup", - version = "0.4.0", - description = "Roundup issue tracking system.", - author = "Richard Jones", - author_email = "richard@users.sourceforge.net", - url = 'http://sourceforge.net/projects/roundup/', - packages = packagelist, - # Override certain command classes with our own ones - cmdclass = { - 'build_scripts': build_scripts_roundup, - }, - scripts = roundup_scripts, - - data_files = installdatafiles -) +def buildTemplates(): + for template in templates: + tdir = os.path.join('roundup', 'templates', template) + makeHtmlBase(tdir) + +if __name__ == '__main__': + # build list of scripts from their implementation modules + roundup_scripts = map(scriptname, glob('roundup/scripts/[!_]*.py')) + + # template munching + templates = map(os.path.basename, filter(isTemplateDir, + glob(os.path.join('roundup', 'templates', '*')))) + packagelist = [ + 'roundup', + 'roundup.backends', + 'roundup.scripts', + 'roundup.templates' + ] + installdatafiles = [ + ('share/roundup/cgi-bin', ['cgi-bin/roundup.cgi']), + ] + + # munge the template HTML into the htmlbase module + buildTemplates() + + # add the templates to the setup packages and data files lists + for template in templates: + tdir = os.path.join('roundup', 'templates', template) + + # add the template package and subpackage + packagelist.append('roundup.templates.%s' % template) + packagelist.append('roundup.templates.%s.detectors' % template) + + # scan for data files + tfiles = glob(os.path.join(tdir, 'html', '*')) + tfiles = filter(os.path.isfile, tfiles) + installdatafiles.append( + ('share/roundup/templates/%s/html' % template, tfiles) + ) + + # perform the setup action + from roundup import __version__ + setup( + name = "roundup", + version = __version__, + description = "Roundup issue tracking system.", + author = "Richard Jones", + author_email = "richard@users.sourceforge.net", + url = 'http://sourceforge.net/projects/roundup/', + packages = packagelist, + + # Override certain command classes with our own ones + cmdclass = { + 'build_scripts': build_scripts_roundup, + }, + scripts = roundup_scripts, + + data_files = installdatafiles + ) # # $Log: not supported by cvs2svn $ +# Revision 1.35 2002/06/17 23:14:44 richard +# . #569415 ] {version} +# +# Revision 1.34 2002/05/29 01:16:16 richard +# Sorry about this huge checkin! It's fixing a lot of related stuff in one go +# though. +# +# . #541941 ] changing multilink properties by mail +# . #526730 ] search for messages capability +# . #505180 ] split MailGW.handle_Message +# - also changed cgi client since it was duplicating the functionality +# . build htmlbase if tests are run using CVS checkout (removed note from +# installation.txt) +# . don't create an empty message on email issue creation if the email is empty +# +# Revision 1.33 2002/04/03 05:53:03 richard +# Didn't get around to committing these after the last release. +# +# Revision 1.32 2002/03/27 23:47:58 jhermann +# Fix for scripts running under CMD.EXE +# # Revision 1.31 2002/03/22 18:36:00 jhermann # chmod +x for scripts #