3 from os.path import abspath, dirname, join
4 from setuptools import setup
7 if sys.version_info[:2] == (2, 7):
8 from imp import load_source
10 elif sys.version_info >= (3, 4):
11 from importlib.machinery import SourceFileLoader
14 def load_source(fullname, path):
15 loader = SourceFileLoader(fullname, path)
16 loaded = types.ModuleType(loader.name)
17 loader.exec_module(loaded)
21 raise ImportError("mimedecode requires Python 2.7 or 3.4+")
23 versionpath = join(abspath(dirname(__file__)), "mimedecode", "__version__.py")
24 mimedecode_version = load_source("mimedecode_version", versionpath)
28 version=mimedecode_version.__version__,
29 description="A program to decode MIME messages",
30 long_description="A program to decode MIME messages. " +
31 mimedecode_version.__copyright__,
32 long_description_content_type="text/plain",
33 author="Oleg Broytman",
34 author_email="phd@phdru.name",
35 url="https://phdru.name/Software/Python/#mimedecode",
37 'Homepage': 'https://phdru.name/Software/Python/#mimedecode',
38 'Documentation': 'https://phdru.name/Software/Python/mimedecode.html',
40 'https://phdru.name/Software/Python/'
41 'mimedecode-%s.tar.bz2' % mimedecode_version.__version__,
42 'Git repo': 'https://git.phdru.name/mimedecode.git',
43 'Github repo': 'https://github.com/phdru/mimedecode',
44 'Issue tracker': 'https://github.com/phdru/mimedecode/issues',
46 license=mimedecode_version.__license__,
47 keywords=['email', 'MIME'],
50 'Development Status :: 5 - Production/Stable',
51 'Environment :: Console',
52 'Intended Audience :: End Users/Desktop',
53 'License :: OSI Approved :: GNU General Public License (GPL)',
54 'Operating System :: OS Independent',
55 'Programming Language :: Python :: Implementation :: CPython',
56 'Programming Language :: Python :: Implementation :: PyPy',
57 'Programming Language :: Python :: 2',
58 'Programming Language :: Python :: 2.7',
59 'Programming Language :: Python :: 3',
60 'Programming Language :: Python :: 3.4',
61 'Programming Language :: Python :: 3.5',
62 'Programming Language :: Python :: 3.6',
63 'Programming Language :: Python :: 3.7',
65 packages=['mimedecode'],
68 'mimedecode = mimedecode.__main__:main'
71 python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
72 install_requires=['m_lib.defenc>=1.0'],
73 tests_require=['m_lib>=3.1'],