|
| 1 | +#!/usr/bin/env python |
| 2 | +"""Typescript language support for the CloudFormation CLI""" |
| 3 | +import os.path |
| 4 | +import re |
| 5 | + |
| 6 | +from setuptools import setup |
| 7 | + |
| 8 | +HERE = os.path.abspath(os.path.dirname(__file__)) |
| 9 | + |
| 10 | + |
| 11 | +def read(*parts): |
| 12 | + with open(os.path.join(HERE, *parts), "r", encoding="utf-8") as fp: |
| 13 | + return fp.read() |
| 14 | + |
| 15 | + |
| 16 | +# https://packaging.python.org/guides/single-sourcing-package-version/ |
| 17 | +def find_version(*file_paths): |
| 18 | + version_file = read(*file_paths) |
| 19 | + version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M) |
| 20 | + if version_match: |
| 21 | + return version_match.group(1) |
| 22 | + raise RuntimeError("Unable to find version string.") |
| 23 | + |
| 24 | + |
| 25 | +setup( |
| 26 | + name="cloudformation-cli-typescript-plugin", |
| 27 | + version=find_version("python", "rpdk", "typescript", "__init__.py"), |
| 28 | + description=__doc__, |
| 29 | + long_description=read("README.md"), |
| 30 | + author="eduardomourar", |
| 31 | + url="https://github.com/eduardomourar/cloudformation-cli-typescript-plugin", |
| 32 | + packages=["rpdk.typescript"], |
| 33 | + package_dir={"": "python"}, |
| 34 | + # package_data -> use MANIFEST.in instead |
| 35 | + include_package_data=True, |
| 36 | + zip_safe=True, |
| 37 | + python_requires=">=3.6", |
| 38 | + install_requires=["cloudformation-cli>=0.1,<0.2", "docker>=3.7,<3.8"], |
| 39 | + entry_points={ |
| 40 | + "rpdk.v1.languages": [ |
| 41 | + "typescript = rpdk.typescript.codegen:TypescriptLanguagePlugin", |
| 42 | + ] |
| 43 | + }, |
| 44 | + license="MIT", |
| 45 | + classifiers=[ |
| 46 | + "Development Status :: 2 - Pre-Alpha", |
| 47 | + "Environment :: Console", |
| 48 | + "Intended Audience :: Developers", |
| 49 | + "License :: OSI Approved :: MIT/X Consortium License", |
| 50 | + "Natural Language :: English", |
| 51 | + "Topic :: Software Development :: Build Tools", |
| 52 | + "Topic :: Software Development :: Code Generators", |
| 53 | + "Operating System :: OS Independent", |
| 54 | + "Programming Language :: Python :: 3 :: Only", |
| 55 | + "Programming Language :: Python :: 3.6", |
| 56 | + "Programming Language :: Python :: 3.7", |
| 57 | + ], |
| 58 | + keywords="Amazon Web Services AWS CloudFormation", |
| 59 | +) |
0 commit comments