Merge branch 'weblate-gnu-mailman-postorius' into 'master'
[mailman-postorious.git] / setup.py
blob81df9f5d3a3b52fbbb4d68d380de57635425903e
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.3',
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',