Jose Diaz-Gonzalez

Cleanup setup.py

- Read requirements from requirements.txt
- Support both setuptools and distutils
- Use wrapper for opening the correct file for requirements.txt and the readme
- Import version from package
- Hardcode package list
- Avoid reading in entire license file when specifying the license attribute
Showing 1 changed file with 18 additions and 14 deletions
#!/usr/bin/env python
from setuptools import setup, find_packages
from kappa import __version__
import os
requires = [
'boto3>=1.2.2',
'placebo>=0.4.1',
'click>=5.0',
'PyYAML>=3.11'
]
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname))
setup(
name='kappa',
version=open(os.path.join('kappa', '_version')).read().strip(),
version=__version__,
description='A CLI tool for AWS Lambda developers',
long_description=open('README.rst').read(),
long_description=open_file('README.rst').read(),
url='https://github.com/garnaat/kappa',
author='Mitch Garnaat',
author_email='mitch@garnaat.com',
url='https://github.com/garnaat/kappa',
packages=find_packages(exclude=['tests*']),
license='Apache License 2.0',
packages=['kappa', 'kappa.scripts'],
package_data={'kappa': ['_version']},
package_dir={'kappa': 'kappa'},
entry_points="""
[console_scripts]
kappa=kappa.scripts.cli:cli
""",
install_requires=requires,
license=open("LICENSE").read(),
install_requires=open_file('requirements.txt').readlines(),
test_suite='tests',
include_package_data=True,
zip_safe=True,
classifiers=(
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
......