From b6ec525d7fdf2b54e21859573665e33120594487 Mon Sep 17 00:00:00 2001 From: matiasb Date: Sun, 8 Sep 2019 15:16:30 -0300 Subject: [PATCH] Modernized setup.py. --- setup.py | 52 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/setup.py b/setup.py index 235059a..b839a47 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2012 Matias Bordese +# Copyright (C) 2012-2019 Matias Bordese # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,20 +15,50 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from setuptools import setup, find_packages +import codecs +import os +from setuptools import find_packages, setup -version = __import__('unrar').__version__ +# metadata +NAME = 'unrar' +DESCRIPTION = 'Wrapper for UnRAR library, ctypes-based.' +KEYWORDS = ['unrar', 'ctypes', 'rar'] +URL = 'http://github.com/matiasb/python-unrar' +EMAIL = 'mbordese@gmail.com' +AUTHOR = 'Matias Bordese' +LICENSE = 'GPL-3' + +HERE = os.path.abspath(os.path.dirname(__file__)) + +# use README as the long-description +with codecs.open(os.path.join(HERE, 'README.md'), "rb", "utf-8") as f: + long_description = f.read() + +version = __import__('unrar').__version__ setup( - name='unrar', + name=NAME, version=version, - description="Wrapper for UnRAR library, ctypes-based.", - keywords='unrar ctypes', - author='Matias Bordese', - author_email='mbordese@gmail.com', - url='http://github.com/matiasb/python-unrar', - license='GPL-3', - packages=['unrar'], + description=DESCRIPTION, + long_description=long_description, + long_description_content_type="text/markdown", + keywords=KEYWORDS, + author=AUTHOR, + author_email=EMAIL, + url=URL, + packages=find_packages(exclude=('dependencies',)), + license=LICENSE, + classifiers=[ + 'Intended Audience :: Developers', + 'Development Status :: 4 - Beta', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.2', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + ], )