Skip to content

Commit acf828c

Browse files
authored
Merge pull request #3 from awslabs/bootstrap-python
Bootstrap smithy-python python package
2 parents 0aaba73 + 8899301 commit acf828c

File tree

5 files changed

+92
-0
lines changed

5 files changed

+92
-0
lines changed

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,12 @@ target/
2020
build/
2121
*/out/
2222
*/*/out/
23+
24+
# Python
25+
__pycache__
26+
*.swp
27+
.mypy_cache
28+
.coverage
29+
htmlcov
30+
*.egg_info
31+
dist

requirements-dev.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
black==19.10b0
2+
flake8<3.9
3+
mypy<1.0
4+
pytest<5.5
5+
pytest-asyncio<0.15.0
6+
pytest-cov<2.11

setup.cfg

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[bdist_wheel]
2+
universal = 1
3+
4+
[metadata]
5+
requires_dist =
6+
# TODO
7+
8+
[flake8]
9+
# We ignore E203, E501 for this project due to black
10+
ignore = E203,E501

setup.py

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
)

smithy_python/__init__.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
14+
15+
__version__ = "0.0.1"

0 commit comments

Comments
 (0)