This repository has been archived by the owner on Sep 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
53 lines (46 loc) · 1.77 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env python
"""Setup script for django-dmarc-reporting"""
import codecs
import os
import re
from setuptools import find_packages, setup
def get_long_description():
"""Reads the main README.rst to get the program's long description"""
with codecs.open('README.rst', 'r', 'utf-8') as f_readme:
return f_readme.read()
def get_program_metadata(attribute):
"""Reads program metadata from the main package's __init__"""
with open(os.path.join('dmarc_reporting', '__init__.py'), 'r') as f_init:
return re.search(
r'^__{attr}__\s*=\s*[\'"]([^\'"]*)[\'"]'.format(attr=attribute),
f_init.read(), re.MULTILINE
).group(1)
setup(
name=get_program_metadata('title'),
version=get_program_metadata('version'),
description="Automated DMARC report processing",
long_description=get_long_description(),
author=get_program_metadata('author'),
author_email='[email protected]',
license='BSD',
url='https://github.com/virtualtam/django-dmarc-reporting',
keywords="django dmarc mail report",
packages=find_packages(exclude=['tests.*', 'tests']),
install_requires=[
'django>=3.0,<3.1',
'xmltodict>=0.11,<0.12',
],
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Django',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Internet :: WWW/HTTP :: WSGI',
])