@@ -52,11 +52,8 @@ def scriptname(path):
5252 return script
5353
5454def main ():
55- # build list of scripts from their implementation modules
56- roundup_scripts = map (scriptname , glob ('roundup/scripts/[!_]*.py' ))
57-
5855 # template munching
59- packagelist = [
56+ packages = [
6057 'roundup' ,
6158 'roundup.anypy' ,
6259 'roundup.cgi' ,
@@ -66,44 +63,31 @@ def main():
6663 'roundup.backends' ,
6764 'roundup.scripts' ,
6865 ]
69- installdatafiles = [
70- ('share/roundup/cgi-bin' , ['frontends/roundup.cgi' ]),
71- ]
7266 py_modules = ['roundup.demo' ,]
7367
68+ # build list of scripts from their implementation modules
69+ scripts = [scriptname (f ) for f in glob ('roundup/scripts/[!_]*.py' )]
70+
71+ data_files = [
72+ ('share/roundup/cgi-bin' , ['frontends/roundup.cgi' ]),
73+ ]
7474 # install man pages on POSIX platforms
7575 if os .name == 'posix' :
76- installdatafiles .append (('man/man1' , ['doc/roundup-admin.1' ,
77- 'doc/roundup-mailgw.1' , 'doc/roundup-server.1' ,
78- 'doc/roundup-demo.1' ]))
76+ data_files .append (include ('share/man/man1' , '*' ))
7977
8078 # add the templates to the data files lists
8179 from roundup .init import listTemplates
8280 templates = [t ['path' ] for t in listTemplates (os .path .join ('share' ,'roundup' ,'templates' )).values ()]
8381 for tdir in templates :
84- # scan for data files
8582 for idir in '. detectors extensions html' .split ():
86- idir = os .path .join (tdir , idir )
87- if not os .path .isdir (idir ):
88- continue
89- tfiles = []
90- for f in os .listdir (idir ):
91- if f .startswith ('.' ):
92- continue
93- ifile = os .path .join (idir , f )
94- if os .path .isfile (ifile ):
95- tfiles .append (ifile )
96- installdatafiles .append (
97- (os .path .join ('share' , 'roundup' , idir ), tfiles )
98- )
83+ data_files .append (include (os .path .join (tdir , idir ), '*' ))
9984
10085 # add message files
10186 for (_dist_file , _mo_file ) in list_message_files ():
102- installdatafiles .append ((os .path .dirname (_mo_file ),
103- [os .path .join ("build" , _mo_file )]))
87+ data_files .append ((os .path .dirname (_mo_file ), [os .path .join ("build" , _mo_file )]))
10488
10589 # add docs
106- installdatafiles .append (include (os .path .join ('share' , 'doc' , 'roundup' , 'html' ), '*' ))
90+ data_files .append (include (os .path .join ('share' , 'doc' , 'roundup' , 'html' ), '*' ))
10791
10892 # perform the setup action
10993 from roundup import __version__
@@ -140,10 +124,10 @@ def main():
140124 'build' : build ,
141125 'bdist_rpm' : bdist_rpm ,
142126 },
143- packages = packagelist ,
127+ packages = packages ,
144128 py_modules = py_modules ,
145- scripts = roundup_scripts ,
146- data_files = installdatafiles )
129+ scripts = scripts ,
130+ data_files = data_files )
147131
148132if __name__ == '__main__' :
149133 main ()
0 commit comments