2018-06-25 13:15:32 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
import os
|
|
|
|
import re
|
|
|
|
import sys
|
|
|
|
|
|
|
|
from setuptools import setup
|
|
|
|
|
|
|
|
|
|
|
|
def get_version(package):
|
|
|
|
"""
|
|
|
|
Return package version as listed in `__version__` in `init.py`.
|
|
|
|
"""
|
|
|
|
init_py = open(os.path.join(package, '__init__.py')).read()
|
|
|
|
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
|
|
|
|
|
|
|
|
|
|
|
|
def get_long_description():
|
|
|
|
"""
|
|
|
|
Return the README.
|
|
|
|
"""
|
2018-07-17 20:38:38 +00:00
|
|
|
return open('README.md', 'r', encoding="utf8").read()
|
2018-06-25 13:15:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
def get_packages(package):
|
|
|
|
"""
|
|
|
|
Return root package and all sub-packages.
|
|
|
|
"""
|
|
|
|
return [dirpath
|
|
|
|
for dirpath, dirnames, filenames in os.walk(package)
|
|
|
|
if os.path.exists(os.path.join(dirpath, '__init__.py'))]
|
|
|
|
|
|
|
|
|
|
|
|
setup(
|
|
|
|
name='starlette',
|
|
|
|
version=get_version('starlette'),
|
|
|
|
url='https://github.com/encode/starlette',
|
|
|
|
license='BSD',
|
|
|
|
description='The little ASGI library that shines.',
|
|
|
|
long_description=get_long_description(),
|
|
|
|
long_description_content_type='text/markdown',
|
|
|
|
author='Tom Christie',
|
|
|
|
author_email='tom@tomchristie.com',
|
|
|
|
packages=get_packages('starlette'),
|
2018-09-05 10:39:38 +00:00
|
|
|
extras_require = {
|
|
|
|
'full': [
|
|
|
|
'aiofiles',
|
2018-11-01 12:52:03 +00:00
|
|
|
'graphene',
|
2018-10-29 16:49:13 +00:00
|
|
|
'itsdangerous',
|
2018-11-01 12:52:03 +00:00
|
|
|
'python-multipart',
|
|
|
|
'pyyaml',
|
2018-09-05 10:39:38 +00:00
|
|
|
'requests',
|
2018-11-01 12:52:03 +00:00
|
|
|
'ujson',
|
2018-09-05 10:39:38 +00:00
|
|
|
]
|
|
|
|
},
|
2018-06-25 13:15:32 +00:00
|
|
|
classifiers=[
|
|
|
|
'Development Status :: 3 - Alpha',
|
|
|
|
'Environment :: Web Environment',
|
|
|
|
'Intended Audience :: Developers',
|
|
|
|
'License :: OSI Approved :: BSD License',
|
|
|
|
'Operating System :: OS Independent',
|
|
|
|
'Topic :: Internet :: WWW/HTTP',
|
|
|
|
'Programming Language :: Python :: 3',
|
|
|
|
'Programming Language :: Python :: 3.6',
|
2018-06-25 13:58:51 +00:00
|
|
|
'Programming Language :: Python :: 3.7',
|
2018-06-25 13:15:32 +00:00
|
|
|
],
|
|
|
|
)
|