3737import sys , os
3838from glob import glob
3939
40- # patch distutils if it can't cope with the "classifiers" keyword
41- from distutils .dist import DistributionMetadata
42- if not hasattr (DistributionMetadata , 'classifiers' ):
43- DistributionMetadata .classifiers = None
44- DistributionMetadata .download_url = None
4540
4641def include (d , e ):
4742 """Generate a pair of (directory, file-list) for installation.
@@ -52,15 +47,13 @@ def include(d, e):
5247
5348 return (d , [f for f in glob ('%s/%s' % (d , e )) if os .path .isfile (f )])
5449
55-
56- def mapscript (path ):
50+ def scriptname (path ):
5751 """ Helper for building a list of script names from a list of
5852 module files.
5953 """
60- module = os .path .splitext (os .path .basename (path ))[0 ]
61- script = module .replace ('_' , '-' )
62- return '%s = roundup.scripts.%s:run' % (script , module )
63-
54+ script = os .path .splitext (os .path .basename (path ))[0 ]
55+ script = script .replace ('_' , '-' )
56+ return script
6457
6558def main ():
6659 # template munching
@@ -76,7 +69,7 @@ def main():
7669 ]
7770
7871 # build list of scripts from their implementation modules
79- scripts = [mapscript (f ) for f in glob ('roundup/scripts/[!_]*.py' )]
72+ scripts = [scriptname (f ) for f in glob ('roundup/scripts/[!_]*.py' )]
8073
8174 data_files = [
8275 ('share/roundup/cgi-bin' , ['frontends/roundup.cgi' ]),
@@ -157,9 +150,7 @@ def main():
157150 'install_lib' : install_lib ,
158151 },
159152 packages = packages ,
160- entry_points = {
161- 'console_scripts' : scripts
162- },
153+ scripts = scripts ,
163154 data_files = data_files )
164155
165156if __name__ == '__main__' :
0 commit comments