diff --git a/.gitignore b/.gitignore index c01141aa..68ece266 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,12 @@ target/ build/ */out/ */*/out/ + +# Python +__pycache__ +*.swp +.mypy_cache +.coverage +htmlcov +*.egg_info +dist diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 00000000..5ff85aa5 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,6 @@ +black==19.10b0 +flake8<3.9 +mypy<1.0 +pytest<5.5 +pytest-asyncio<0.15.0 +pytest-cov<2.11 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..b3e3c11f --- /dev/null +++ b/setup.cfg @@ -0,0 +1,10 @@ +[bdist_wheel] +universal = 1 + +[metadata] +requires_dist = + # TODO + +[flake8] +# We ignore E203, E501 for this project due to black +ignore = E203,E501 diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..158c2e7f --- /dev/null +++ b/setup.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python +import codecs +import os.path +import re + +from setuptools import setup, find_packages + + +here = os.path.abspath(os.path.dirname(__file__)) + + +def read(*parts): + return codecs.open(os.path.join(here, *parts), "r", encoding="utf-8").read() + + +def find_version(*file_paths): + version_file = read(*file_paths) + version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M) + if version_match: + return version_match.group(1) + raise RuntimeError("Unable to find version string.") + + +requires = [] + +setup( + name="smithy-python", + version=find_version("smithy_python", "__init__.py"), + description="Core libraries for Smithy defined services in Python", + long_description=open("README.md", "r", encoding="utf-8").read(), + long_description_content_type='text/markdown', + author="Amazon Web Services", + url="https://github.com/awslabs/smithy-python", + scripts=[], + packages=find_packages(exclude=["tests*", "codegen"]), + include_package_data=True, + install_requires=requires, + extras_require={}, + license="Apache License 2.0", + classifiers=[ + "Development Status :: 2 - Pre-Alpha", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Natural Language :: English", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + ], +) diff --git a/smithy_python/__init__.py b/smithy_python/__init__.py new file mode 100644 index 00000000..326becef --- /dev/null +++ b/smithy_python/__init__.py @@ -0,0 +1,15 @@ +# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + + +__version__ = "0.0.1"