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