1#!/usr/bin/env python
2
3# This software is provided 'as-is', without any express or implied
4# warranty.  In no event will the author be held liable for any damages
5# arising from the use of this software.
6#
7# Permission is granted to anyone to use this software for any purpose,
8# including commercial applications, and to alter it and redistribute it
9# freely, subject to the following restrictions:
10#
11# 1. The origin of this software must not be misrepresented; you must not
12#    claim that you wrote the original software. If you use this software
13#    in a product, an acknowledgment in the product documentation would be
14#    appreciated but is not required.
15# 2. Altered source versions must be plainly marked as such, and must not be
16#    misrepresented as being the original software.
17# 3. This notice may not be removed or altered from any source distribution.
18#
19# Copyright (c) 2008 Greg Hewgill http://hewgill.com
20#
21# This has been modified from the original software.
22# Copyright (c) 2011,2012,2018 Scott Kitterman <scott@kitterman.com>
23
24from setuptools import setup
25import os
26import sys
27
28version = "1.0.5"
29
30kw = {}  # Work-around for lack of 'or' requires in setuptools.
31try:
32    import DNS
33    if sys.version_info[0] == 2:
34        kw['install_requires'] = ['PyDNS']
35    else:
36        kw['install_requires'] = ['Py3DNS']
37except ImportError:  # If PyDNS is not installed, prefer dnspython
38    kw['install_requires'] = ['dnspython>=1.16.0']
39
40with open("README.md", "r") as fh:
41    long_description = fh.read()
42
43setup(
44    name = "dkimpy",
45    version = version,
46    description = "DKIM (DomainKeys Identified Mail), ARC (Authenticated Receive Chain), and TLSRPT (TLS Report) email signing and verification",
47    long_description=long_description,
48    long_description_content_type='text/markdown',
49    author = "Scott Kitterman",
50    author_email = "scott@kitterman.com",
51    url = "https://launchpad.net/dkimpy",
52    license = "BSD-like",
53    packages = ["dkim"],
54    entry_points = {
55        'console_scripts' : [
56            'arcsign = dkim.arcsign:main',
57            'arcverify = dkim.arcverify:main',
58            'dkimsign = dkim.dkimsign:main',
59            'dkimverify = dkim.dkimverify:main',
60            'dknewkey = dkim.dknewkey:main'
61        ],
62    },
63    data_files = [(os.path.join('man', 'man1'),
64        ['man/arcsign.1']), (os.path.join('man', 'man1'),
65        ['man/arcverify.1']),(os.path.join('man', 'man1'),
66        ['man/dkimsign.1']), (os.path.join('man', 'man1'),
67        ['man/dkimverify.1']),(os.path.join('man', 'man1'),
68        ['man/dknewkey.1']),],
69    classifiers = [
70      'Development Status :: 5 - Production/Stable',
71      'Environment :: No Input/Output (Daemon)',
72      'Intended Audience :: Developers',
73      'License :: DFSG approved',
74      'Natural Language :: English',
75      'Operating System :: OS Independent',
76      'Programming Language :: Python',
77      'Programming Language :: Python :: 3',
78      'Topic :: Communications :: Email :: Mail Transport Agents',
79      'Topic :: Communications :: Email :: Filters',
80      'Topic :: Internet :: Name Service (DNS)',
81      'Topic :: Software Development :: Libraries :: Python Modules'
82      ],
83    zip_safe = False,
84    extras_require={
85        'testing': [
86            'authres',
87            'pynacl',
88        ],
89        'ed25519':  ['pynacl'],
90        'ARC': ['authres'],
91        'asyncio': ['aiodns']
92    },
93    **kw
94)
95
96if os.name != 'posix':
97    data_files = ''
98