-setup(name = "mimedecode",
- version = __version__,
- description = "A program to decode MIME messages",
- long_description = "A program to decode MIME messages. " + __copyright__,
- author = "Oleg Broytman",
- author_email = "phd@phdru.name",
- url = "http://phdru.name/Software/Python/#mimedecode",
- license = __license__,
- platforms = "All",
+elif sys.version_info >= (3, 4):
+ exec(open(versionpath, 'r').read(), mimedecode_version)
+
+else:
+ raise ImportError("mimedecode requires Python 2.7 or 3.4+")
+
+setup(
+ name="mimedecode",
+ version=mimedecode_version['__version__'],
+ description="A program to decode MIME messages",
+ long_description="A program to decode MIME messages. " +
+ mimedecode_version['__copyright__'],
+ long_description_content_type="text/plain",
+ author="Oleg Broytman",
+ author_email="phd@phdru.name",
+ url="https://phdru.name/Software/Python/#mimedecode",
+ project_urls={
+ 'Homepage': 'https://phdru.name/Software/Python/#mimedecode',
+ 'Documentation': 'https://phdru.name/Software/Python/mimedecode.html',
+ 'Download':
+ 'https://phdru.name/Software/Python/'
+ 'mimedecode-%s.tar.bz2' % mimedecode_version['__version__'],
+ 'Git repo': 'https://git.phdru.name/mimedecode.git',
+ 'Github repo': 'https://github.com/phdru/mimedecode',
+ 'Issue tracker': 'https://github.com/phdru/mimedecode/issues',
+ },
+ license=mimedecode_version['__license__'],