From 55cc2a09b39914bdf96b8f947d96becab78aed17 Mon Sep 17 00:00:00 2001 From: Randall Degges Date: Tue, 31 Mar 2015 11:04:24 -0700 Subject: [PATCH] Porting setup.py -> setuptools. Also: adding in six as a dependency to fix the broken build. Fixes #11. --- setup.py | 60 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/setup.py b/setup.py index 46cae39..5f62cee 100755 --- a/setup.py +++ b/setup.py @@ -1,44 +1,43 @@ -#!/usr/bin/env python +"""Packaging files and information.""" -from distutils.core import setup + +from setuptools import setup from asterisk import __version__ as version -description = [] -f = open('README.rst') - -logo_stripped = False -for line in f: - if not logo_stripped and line.strip(): - continue - logo_stripped = True - description.append(line) - -licenses = ('Python Software Foundation License', - 'GNU Library or Lesser General Public License (LGPL)') - setup( - name='pyst2', - version=version, - description='A Python Interface to Asterisk', - long_description=''.join(description), author='Karl Putland', - author_email='kputland@users.sourceforge.net', - maintainer='Randall Degges', - maintainer_email='rdegges@gmail.com', - url='https://github.com/rdegges/pyst2', - packages=['asterisk'], - license=', '.join(licenses), - platforms='Any', - classifiers=[ + + # Basic package information: + name = 'pyst2', + version = version, + packages = ['asterisk'], + + # Packaging options: + zip_safe = False, + include_package_data = True, + + # Package dependencies: + install_requires = ['six>=1.9.0'], + + # Metadata for PyPI: + author = 'Randall Degges', + author_email = 'r@rdegges.com', + license = 'Python Software Foundation License / GNU Library or Lesser General Public License (LGPL) / UNLICENSE', + url = 'https://github.com/rdegges/pyst2', + keywords = 'python asterisk agi ami telephony telephony sip voip', + description = 'A Python Interface to Asterisk', + long_description = open('README.rst').read(), + + # Classifiers: + platforms = 'Any', + classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Other Environment', 'Intended Audience :: Developers', 'Intended Audience :: Telecommunications Industry', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 2.4', - 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', @@ -48,5 +47,6 @@ setup( 'Topic :: Communications :: Internet Phone', 'Topic :: Communications :: Telephony', 'Topic :: Software Development :: Libraries :: Python Modules' - ] + ['License :: OSI Approved :: ' + l for l in licenses] + ], + )