base64io-python/setup.py

62 lines
1.9 KiB
Python
Raw Permalink Normal View History

2018-03-13 03:11:36 +00:00
"""Base64IO stream handler."""
import io
import os
import re
from setuptools import find_packages, setup
2018-06-05 23:21:48 +00:00
VERSION_RE = re.compile(r"""__version__ = ['"]([0-9.]+)['"]""")
2018-03-13 03:11:36 +00:00
HERE = os.path.abspath(os.path.dirname(__file__))
def read(*args):
"""Read complete file contents."""
2018-06-05 23:21:48 +00:00
return io.open(os.path.join(HERE, *args), encoding="utf-8").read()
2018-03-13 03:11:36 +00:00
def readme():
"""Read and patch README."""
2018-06-05 23:21:48 +00:00
readme_text = read("README.rst")
2018-03-13 03:11:36 +00:00
# PyPI does not accept :class: references.
2018-06-05 23:21:48 +00:00
return readme_text.replace(":class:`base64io.Base64IO`", "``base64io.Base64IO``")
2018-03-13 03:11:36 +00:00
def get_version():
"""Read the version from this module."""
2018-06-05 23:21:48 +00:00
init = read("src", "base64io", "__init__.py")
2018-03-13 03:11:36 +00:00
return VERSION_RE.search(init).group(1)
setup(
2018-06-05 23:21:48 +00:00
name="base64io",
2018-03-13 03:11:36 +00:00
version=get_version(),
2018-06-05 23:21:48 +00:00
packages=find_packages("src"),
package_dir={"": "src"},
url="https://github.com/aws/base64io-python",
2018-06-05 23:21:48 +00:00
author="Amazon Web Services",
author_email="aws-cryptools@amazon.com",
maintainer="Amazon Web Services",
2018-03-13 03:11:36 +00:00
long_description=readme(),
2018-06-05 23:21:48 +00:00
keywords="base64 stream",
data_files=["README.rst", "CHANGELOG.rst", "LICENSE"],
license="Apache License 2.0",
2018-03-13 03:11:36 +00:00
install_requires=[],
classifiers=[
2018-06-05 23:21:48 +00:00
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: Implementation :: CPython",
],
2018-03-13 03:11:36 +00:00
)