ansible-later/setup.py

69 lines
2.4 KiB
Python
Raw Normal View History

2018-12-19 10:19:07 +00:00
#!/usr/bin/env python
"""Setup script for the package."""
import io
2019-04-09 08:58:15 +00:00
import os
import re
2019-10-15 22:37:39 +00:00
from setuptools import find_packages
from setuptools import setup
2018-12-19 10:19:07 +00:00
PACKAGE_NAME = "ansiblelater"
def get_property(prop, project):
current_dir = os.path.dirname(os.path.realpath(__file__))
result = re.search(
r'{}\s*=\s*[\'"]([^\'"]*)[\'"]'.format(prop),
2020-04-05 12:33:43 +00:00
open(os.path.join(current_dir, project, "__init__.py")).read()
)
2018-12-19 10:19:07 +00:00
return result.group(1)
def get_readme(filename="README.md"):
2018-12-19 10:19:07 +00:00
this = os.path.abspath(os.path.dirname(__file__))
with io.open(os.path.join(this, filename), encoding="utf-8") as f:
2018-12-19 10:19:07 +00:00
long_description = f.read()
return long_description
setup(
name=get_property("__project__", PACKAGE_NAME),
description=("Reviews ansible playbooks, roles and inventories and suggests improvements."),
keywords="ansible code review",
2020-04-05 12:33:43 +00:00
version=get_property("__version__", PACKAGE_NAME),
2018-12-19 10:19:07 +00:00
author=get_property("__author__", PACKAGE_NAME),
author_email=get_property("__email__", PACKAGE_NAME),
2020-04-05 12:33:43 +00:00
url=get_property("__url__", PACKAGE_NAME),
2018-12-19 10:19:07 +00:00
license=get_property("__license__", PACKAGE_NAME),
long_description=get_readme(),
2019-04-09 08:58:15 +00:00
long_description_content_type="text/markdown",
2020-04-05 22:01:06 +00:00
packages=find_packages(exclude=["*.test", "test", "test.*"]),
2019-04-23 12:37:19 +00:00
package_data={"ansiblelater": ["data/*"]},
2020-04-05 20:43:32 +00:00
python_requires=">=3.5,<4",
2018-12-19 10:19:07 +00:00
classifiers=[
2019-04-09 08:58:15 +00:00
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"Natural Language :: English",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
2020-02-04 07:55:51 +00:00
"Programming Language :: Python :: 3.8",
2019-04-09 08:58:15 +00:00
"Topic :: Utilities",
2020-04-05 21:06:50 +00:00
"Topic :: Software Development",
2018-12-19 10:19:07 +00:00
],
include_package_data=True,
zip_safe=False,
install_requires=[
2020-04-05 12:33:43 +00:00
"ansible", "six", "pyyaml", "appdirs", "unidiff", "flake8", "yamllint", "nested-lookup",
"colorama", "anyconfig", "python-json-logger", "jsonschema", "pathspec", "toolz"
2018-12-19 10:19:07 +00:00
],
2020-04-05 12:33:43 +00:00
entry_points={"console_scripts": ["ansible-later = ansiblelater.__main__:main"]},
2018-12-19 10:19:07 +00:00
)