Always import owners/moderators with delivery enabled.
[mailman.git] / setup.py
blobe970f2b7727aac036ff2fb1a43ce61d19c9296a2
1 # Copyright (C) 2007-2022 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)
8 # any later version.
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
13 # more details.
15 # You should have received a copy of the GNU General Public License along with
16 # GNU Mailman. If not, see <https://www.gnu.org/licenses/>.
18 import re
19 import sys
21 from setuptools import setup, find_packages
22 from string import Template
25 if sys.hexversion < 0x30600f0:
26 print('Mailman requires at least Python 3.6')
27 sys.exit(1)
30 # Calculate the version number without importing the mailman package.
31 with open('src/mailman/version.py') as fp:
32 for line in fp:
33 mo = re.match("VERSION = '(?P<version>[^']+?)'", line)
34 if mo:
35 __version__ = mo.group('version')
36 break
37 else:
38 print('No version number found')
39 sys.exit(1)
43 # Ensure that all the .mo files are generated from the corresponding .po file.
44 # This procedure needs to be made sane, probably when the language packs are
45 # properly split out.
47 # Create the .mo files from the .po files. There may be errors and warnings
48 # here and that could cause the digester.txt test to fail.
49 ## start_dir = os.path.dirname('src/mailman/messages')
50 ## for dirpath, dirnames, filenames in os.walk(start_dir):
51 ## for filename in filenames:
52 ## po_file = os.path.join(dirpath, filename)
53 ## basename, ext = os.path.splitext(po_file)
54 ## if ext <> '.po':
55 ## continue
56 ## mo_file = basename + '.mo'
57 ## if (not os.path.exists(mo_file) or
58 ## os.path.getmtime(po_file) > os.path.getmtime(mo_file)):
59 ## # The mo file doesn't exist or is older than the po file.
60 ## os.system('msgfmt -o %s %s' % (mo_file, po_file))
64 # XXX The 'bin/' prefix here should be configurable.
65 template = Template('$script = mailman.bin.$script:main')
66 scripts = set(
67 template.substitute(script=script)
68 for script in ('mailman', 'runner', 'master')
73 setup(
74 name = 'mailman',
75 version = __version__,
76 description = 'Mailman -- the GNU mailing list manager',
77 long_description= """\
78 This is GNU Mailman, a mailing list management system distributed under the
79 terms of the GNU General Public License (GPL) version 3 or later. The name of
80 this software is spelled 'Mailman' with a leading capital 'M' but with a lower
81 case second 'm'. Any other spelling is incorrect.""",
82 author = 'The Mailman Developers',
83 author_email = 'mailman-developers@python.org',
84 license = 'GPLv3',
85 url = 'https://www.list.org',
86 project_urls={
87 'Documentation': 'https://docs.mailman3.org/projects/mailman/en/latest/README.html',
88 'Source': 'https://gitlab.com/mailman/mailman.git',
89 'Tracker': 'https://gitlab.com/mailman/mailman/-/issues',
91 keywords = 'email',
92 classifiers = [
93 'Development Status :: 5 - Production/Stable',
94 'Intended Audience :: System Administrators',
95 'License :: OSI Approved :: '
96 'GNU General Public License v3 or later (GPLv3+)',
97 'Operating System :: POSIX',
98 'Programming Language :: Python :: 3.6',
99 'Programming Language :: Python :: 3.7',
100 'Programming Language :: Python :: 3.8',
101 'Programming Language :: Python :: 3.9',
102 'Topic :: Communications :: Email :: Mailing List Servers',
103 'Topic :: Communications :: Usenet News',
104 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
106 packages = find_packages('src'),
107 package_dir = {'': 'src'},
108 include_package_data = True,
109 entry_points = {
110 'console_scripts' : list(scripts),
112 install_requires = [
113 'aiosmtpd>=1.4.1',
114 'alembic>=1.6.2,!=1.7.0',
115 'atpublic',
116 'attrs<21.3.0',
117 'authheaders>=0.14.0',
118 'authres>=1.0.1',
119 'click>=8.0.0',
120 'dnspython>=1.14.0',
121 'falcon>=3.0.0',
122 'flufl.bounce>=4.0',
123 'flufl.i18n>=3.2',
124 'flufl.lock>=5.1',
125 'importlib_resources>=1.1.0',
126 'gunicorn',
127 'lazr.config',
128 'python-dateutil>=2.0',
129 'passlib',
130 'requests',
131 'sqlalchemy>=1.2.3,<1.4',
132 'zope.component',
133 'zope.configuration',
134 'zope.event',
135 'zope.interface>=5.0',
139 # flake8: noqa