|
| 1 | +"""DynamoDB Encryption Client for Python examples.""" |
| 2 | +import io |
| 3 | +import os |
| 4 | +import re |
| 5 | + |
| 6 | +from setuptools import find_packages, setup |
| 7 | + |
| 8 | +VERSION_RE = re.compile(r"""__version__ = ['"]([0-9.]+)['"]""") |
| 9 | +HERE = os.path.abspath(os.path.dirname(__file__)) |
| 10 | + |
| 11 | + |
| 12 | +def read(*args): |
| 13 | + """Reads complete file contents.""" |
| 14 | + return io.open(os.path.join(HERE, *args), encoding="utf-8").read() |
| 15 | + |
| 16 | + |
| 17 | +def get_version(): |
| 18 | + """Reads the version from this module.""" |
| 19 | + init = read("src", "dynamodb_encryption_sdk_examples", "__init__.py") |
| 20 | + return VERSION_RE.search(init).group(1) |
| 21 | + |
| 22 | + |
| 23 | +def get_requirements(): |
| 24 | + """Reads the requirements file.""" |
| 25 | + requirements = read("requirements.txt") |
| 26 | + return requirements.strip().splitlines() |
| 27 | + |
| 28 | + |
| 29 | +setup( |
| 30 | + name="dynamodb-encryption-sdk-examples", |
| 31 | + version=get_version(), |
| 32 | + packages=find_packages("src"), |
| 33 | + package_dir={"": "src"}, |
| 34 | + url="https://github.com/aws/aws-dynamodb-encryption-python", |
| 35 | + author="Amazon Web Services", |
| 36 | + |
| 37 | + maintainer="Amazon Web Services", |
| 38 | + description="DynamoDB Encryption Client for Python examples", |
| 39 | + long_description=read("README.rst"), |
| 40 | + keywords="dynamodb-encryption-sdk aws kms encryption dynamodb", |
| 41 | + data_files=["requirements.txt"], |
| 42 | + license="Apache License 2.0", |
| 43 | + install_requires=get_requirements(), |
| 44 | + classifiers=[ |
| 45 | + "Development Status :: 5 - Production/Stable", |
| 46 | + "Intended Audience :: Developers", |
| 47 | + "Natural Language :: English", |
| 48 | + "License :: OSI Approved :: Apache Software License", |
| 49 | + "Programming Language :: Python", |
| 50 | + "Programming Language :: Python :: 2", |
| 51 | + "Programming Language :: Python :: 2.7", |
| 52 | + "Programming Language :: Python :: 3", |
| 53 | + "Programming Language :: Python :: 3.5", |
| 54 | + "Programming Language :: Python :: 3.6", |
| 55 | + "Programming Language :: Python :: 3.7", |
| 56 | + "Programming Language :: Python :: 3.8", |
| 57 | + "Programming Language :: Python :: 3.9", |
| 58 | + "Programming Language :: Python :: Implementation :: CPython", |
| 59 | + "Topic :: Security", |
| 60 | + "Topic :: Security :: Cryptography", |
| 61 | + ], |
| 62 | +) |
0 commit comments