|
| 1 | +#!/usr/bin/env python |
| 2 | +import codecs |
| 3 | +import os.path |
| 4 | +import re |
| 5 | + |
| 6 | +from setuptools import setup, find_packages |
| 7 | + |
| 8 | + |
| 9 | +here = os.path.abspath(os.path.dirname(__file__)) |
| 10 | + |
| 11 | + |
| 12 | +def read(*parts): |
| 13 | + return codecs.open(os.path.join(here, *parts), "r", encoding="utf-8").read() |
| 14 | + |
| 15 | + |
| 16 | +def find_version(*file_paths): |
| 17 | + version_file = read(*file_paths) |
| 18 | + version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M) |
| 19 | + if version_match: |
| 20 | + return version_match.group(1) |
| 21 | + raise RuntimeError("Unable to find version string.") |
| 22 | + |
| 23 | + |
| 24 | +requires = [] |
| 25 | + |
| 26 | +setup( |
| 27 | + name="smithy-python", |
| 28 | + version=find_version("smithy_python", "__init__.py"), |
| 29 | + description="Core libraries for Smithy defined services in Python", |
| 30 | + long_description=open("README.md", "r", encoding="utf-8").read(), |
| 31 | + long_description_content_type='text/markdown', |
| 32 | + author="Amazon Web Services", |
| 33 | + url="https://github.com/awslabs/smithy-python", |
| 34 | + scripts=[], |
| 35 | + packages=find_packages(exclude=["tests*", "codegen"]), |
| 36 | + include_package_data=True, |
| 37 | + install_requires=requires, |
| 38 | + extras_require={}, |
| 39 | + license="Apache License 2.0", |
| 40 | + classifiers=[ |
| 41 | + "Development Status :: 2 - Pre-Alpha", |
| 42 | + "Intended Audience :: Developers", |
| 43 | + "Intended Audience :: System Administrators", |
| 44 | + "Natural Language :: English", |
| 45 | + "License :: OSI Approved :: Apache Software License", |
| 46 | + "Programming Language :: Python", |
| 47 | + "Programming Language :: Python :: 3", |
| 48 | + "Programming Language :: Python :: 3.6", |
| 49 | + "Programming Language :: Python :: 3.7", |
| 50 | + "Programming Language :: Python :: 3.8", |
| 51 | + ], |
| 52 | +) |
0 commit comments