Merge branch 'anon' into 'master'
[mailman-postorious.git] / setup.py
blobbf16cbea2425c3a0a00d6af791d00c9eb11e547b
1 # Copyright (C) 2012-2023 by the Free Software Foundation, Inc.
3 # This file is part of Postorius.
5 # Postorius is free software: you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published by the
7 # Free Software Foundation, either version 3 of the License, or (at your
8 # option) any later version.
10 # Postorius 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 Lesser General Public License
13 # for more details.
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with Postorius. If not, see <http://www.gnu.org/licenses/>.
18 import re
19 import sys
21 from setuptools import find_packages, setup
24 # Calculate the version number without importing the postorius package.
25 with open('src/postorius/__init__.py') as fp:
26 for line in fp:
27 mo = re.match("__version__ = '(?P<version>[^']+?)'", line)
28 if mo:
29 __version__ = mo.group('version')
30 break
31 else:
32 print('No version number found')
33 sys.exit(1)
36 setup(
37 name='postorius',
38 version=__version__,
39 description='A web user interface for GNU Mailman',
40 long_description=open('README.rst').read(),
41 maintainer='The Mailman GSOC Coders',
42 license='GPLv3',
43 keywords='email mailman django',
44 url=' https://gitlab.com/mailman/postorius',
45 classifiers=[
46 'Framework :: Django',
47 'Development Status :: 4 - Beta',
48 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
49 'Topic :: Communications :: Email :: Mailing List Servers',
50 'Programming Language :: Python :: 3',
52 packages=find_packages('src'),
53 package_dir={'': 'src'},
54 include_package_data=True,
55 install_requires=[
56 'django-mailman3>=1.3.8',
57 'django>=3.2,<4.2',
58 'mailmanclient>=3.3.3',
59 'readme_renderer[md]',
61 tests_require=[
62 'beautifulsoup4',
63 'isort',
64 'django-debug-toolbar',
65 'django-requests-debug-toolbar',