1 # Copyright (C) 2007-2008 by the Free Software Foundation, Inc.
3 # This file is part of GNU Mailman.
5 # GNU Mailman is free software: you can redistribute it and/or modify it under
6 # the terms of the GNU General Public License as published by the Free
7 # Software Foundation, either version 3 of the License, or (at your option)
10 # GNU Mailman is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 # You should have received a copy of the GNU General Public License along with
16 # GNU Mailman. If not, see <http://www.gnu.org/licenses/>.
19 ez_setup
.use_setuptools()
22 from string
import Template
25 from mailman
.version
import VERSION
as __version__
26 from setuptools
import setup
, find_packages
30 if sys
.hexversion
< 0x20500f0:
31 print 'Mailman requires at least Python 2.5'
36 # Ensure that all the .mo files are generated from the corresponding .po file.
37 # This procedure needs to be made sane, probably when the language packs are
41 import mailman
.commands
42 import mailman
.messages
44 start_dir
= os
.path
.dirname(mailman
.messages
.__file
__)
45 for dirpath
, dirnames
, filenames
in os
.walk(start_dir
):
46 for filename
in filenames
:
47 po_file
= os
.path
.join(dirpath
, filename
)
48 basename
, ext
= os
.path
.splitext(po_file
)
51 mo_file
= basename
+ '.mo'
52 if (not os
.path
.exists(mo_file
) or
53 os
.path
.getmtime(po_file
) > os
.path
.getmtime(mo_file
)):
54 # The mo file doesn't exist or is older than the po file.
55 os
.system('bin/msgfmt.py -o %s %s' % (mo_file
, po_file
))
59 # XXX The 'bin/' prefix here should be configurable.
60 template
= Template('bin/$script = mailman.bin.$script:main')
62 template
.substitute(script
=script
)
63 for script
in mailman
.bin
.__all
__
66 # Default email commands
67 template
= Template('$command = mailman.commands.$command')
69 template
.substitute(command
=command
)
70 for command
in mailman
.commands
.__all
__
77 version
= __version__
,
78 description
= 'Mailman -- the GNU mailing list manager',
79 long_description
= """\
80 This is GNU Mailman, a mailing list management system distributed under the
81 terms of the GNU General Public License (GPL) version 3 or later. The name of
82 this software is spelled 'Mailman' with a leading capital 'M' but with a lower
83 case second `m'. Any other spelling is incorrect.""",
84 author
= 'The Mailman Developers',
85 author_email
= 'mailman-developers@python.org',
87 url
= 'http://www.list.org',
89 packages
= find_packages(),
90 include_package_data
= True,
92 'console_scripts': list(scripts
),
93 # Entry point for plugging in different database backends.
94 'mailman.archiver' : [
95 'mail-archive = mailman.archiving.mailarchive:MailArchive',
96 'mhonarc = mailman.archiving.mhonarc:MHonArc',
97 'pipermail = mailman.archiving.pipermail:Pipermail',
98 'prototype = mailman.archiving.prototype:Prototype',
100 'mailman.scrubber' : 'stock = mailman.archiving.pipermail:Pipermail',
101 'mailman.commands' : list(commands
),
102 'mailman.database' : 'stock = mailman.database:StockDatabase',
103 'mailman.mta' : 'stock = mailman.MTA:Manual',
104 'mailman.styles' : 'default = mailman.core.styles:DefaultStyle',
105 'mailman.mta' : 'stock = mailman.MTA:Manual',
106 'mailman.rules' : 'default = mailman.rules:initialize',
107 'mailman.handlers' : 'default = mailman.pipeline:initialize',