Skip to content

Commit 0e9d181

Browse files
author
Jürgen Hermann
committed
Install html template files to share/roundup/templates
1 parent a1a7451 commit 0e9d181

File tree

1 file changed

+43
-20
lines changed

1 file changed

+43
-20
lines changed

setup.py

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
19-
# $Id: setup.py,v 1.25 2001-11-21 23:42:54 richard Exp $
19+
# $Id: setup.py,v 1.26 2001-12-08 07:06:20 jhermann Exp $
2020

2121
from distutils.core import setup, Extension
2222
from distutils.util import get_platform
@@ -29,33 +29,56 @@
2929
import test
3030
test.go()
3131

32-
templates = 'classic', 'extended'
33-
packagelist = [ 'roundup', 'roundup.backends', 'roundup.templates' ]
34-
installdatafiles = []
3532

36-
for t in templates:
37-
makeHtmlBase(os.path.join('roundup', 'templates', t))
38-
packagelist.append('roundup.templates.%s'%t)
39-
packagelist.append('roundup.templates.%s.detectors'%t)
40-
tfiles = glob(os.path.join('roundup','templates', t, 'html', '*'))
33+
def isTemplateDir(dir):
34+
return dir[0] != '.' and dir != 'CVS' and os.path.isdir(dir) \
35+
and os.path.isfile(os.path.join(dir, '__init__.py'))
36+
37+
templates = map(os.path.basename, filter(isTemplateDir,
38+
glob(os.path.join('roundup', 'templates', '*'))))
39+
packagelist = [
40+
'roundup',
41+
'roundup.backends',
42+
'roundup.templates'
43+
]
44+
installdatafiles = [
45+
('share/roundup/cgi-bin', ['cgi-bin/roundup.cgi']),
46+
]
47+
48+
for template in templates:
49+
tdir = os.path.join('roundup', 'templates', template)
50+
makeHtmlBase(tdir)
51+
52+
# add the template package and subpackage
53+
packagelist.append('roundup.templates.%s' % template)
54+
packagelist.append('roundup.templates.%s.detectors' % template)
55+
56+
# scan for data files
57+
tfiles = glob(os.path.join(tdir, 'html', '*'))
4158
tfiles = filter(os.path.isfile, tfiles)
59+
installdatafiles.append(
60+
('share/roundup/templates/%s/html' % template, tfiles)
61+
)
4262

4363

44-
setup ( name = "roundup",
45-
version = "0.3.0",
46-
description = "Roundup issue tracking system.",
47-
author = "Richard Jones",
48-
author_email = "[email protected]",
49-
url = 'http://sourceforge.net/projects/roundup/',
50-
packages = packagelist,
51-
scripts = ['roundup-admin', 'roundup-mailgw', 'roundup-server'],
52-
data_files= [
53-
('share/roundup/cgi-bin', ['cgi-bin/roundup.cgi']),
54-
]
64+
setup(
65+
name = "roundup",
66+
version = "0.3.0",
67+
description = "Roundup issue tracking system.",
68+
author = "Richard Jones",
69+
author_email = "[email protected]",
70+
url = 'http://sourceforge.net/projects/roundup/',
71+
packages = packagelist,
72+
scripts = ['roundup-admin', 'roundup-mailgw', 'roundup-server'],
73+
data_files = installdatafiles
5574
)
5675

76+
5777
#
5878
# $Log: not supported by cvs2svn $
79+
# Revision 1.25 2001/11/21 23:42:54 richard
80+
# Some version number and documentation fixes.
81+
#
5982
# Revision 1.24 2001/11/06 22:32:15 jhermann
6083
# Install roundup.cgi to share/roundup
6184
#

0 commit comments

Comments
 (0)