-
Notifications
You must be signed in to change notification settings - Fork 26
/
setup.py
executable file
·64 lines (59 loc) · 2.21 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
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/python
from setuptools import setup
import sys
DESC = """SPF (Sender Policy Framework) implemented in Python."""
with open("README.md", "r") as fh:
LONG_DESC = fh.read()
try:
import dns
from dns import version
# dnspython minimum version is for timeout support
if (version.MAJOR, version.MINOR) >= (1,16):
if sys.version_info[0] == 2:
install_req = ['dnspython>=1.16.0', 'authres', 'ipaddress']
else:
install_req = ['dnspython>=1.16.0', 'authres']
# dnspython not present in sufficient version, so require PyDNS
elif sys.version_info[0] == 2:
install_req = ['PyDNS', 'authres', 'ipaddress']
else:
install_req = ['Py3DNS', 'authres']
except ImportError: # If dnspython is not installed, require PyDNS
if sys.version_info[0] == 2:
install_req = ['PyDNS', 'authres', 'ipaddress']
else:
install_req = ['Py3DNS', 'authres']
setup(name='pyspf',
version='2.1.0',
description=DESC,
long_description=LONG_DESC,
long_description_content_type="text/markdown",
author='Terence Way',
author_email='[email protected]',
maintainer="Stuart D. Gathman",
maintainer_email="[email protected]",
url='https://github.com/sdgathman/pyspf/',
license='Python Software Foundation License',
py_modules=['spf'],
keywords = ['spf','email','forgery'],
scripts = ['type99.py','spfquery.py'],
include_package_data=True,
zip_safe = False,
install_requires=install_req,
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: No Input/Output (Daemon)',
'Intended Audience :: Developers',
'License :: OSI Approved :: Python Software Foundation License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Topic :: Communications :: Email :: Mail Transport Agents',
'Topic :: Communications :: Email :: Filters',
'Topic :: Internet :: Name Service (DNS)',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)
if sys.version_info < (2, 6):
raise Exception("pyspf 2.0.6 and later requires at least python2.6.")