Skip to content

Commit

Permalink
Merge pull request #3 from awslabs/bootstrap-python
Browse files Browse the repository at this point in the history
Bootstrap smithy-python python package
  • Loading branch information
joguSD authored Apr 1, 2021
2 parents 0aaba73 + 8899301 commit acf828c
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,12 @@ target/
build/
*/out/
*/*/out/

# Python
__pycache__
*.swp
.mypy_cache
.coverage
htmlcov
*.egg_info
dist
6 changes: 6 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -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
52 changes: 52 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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",
],
)
15 changes: 15 additions & 0 deletions smithy_python/__init__.py
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit acf828c

Please sign in to comment.