ansible-later/setup.py

84 lines
2.6 KiB
Python
Raw Normal View History

2018-12-19 11:19:07 +01:00
#!/usr/bin/env python
"""Setup script for the package."""
import io
2019-04-09 10:58:15 +02:00
import os
import re
from setuptools import find_packages, setup
2018-12-19 11:19:07 +01: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),
2019-04-09 10:58:15 +02:00
open(os.path.join(current_dir, project, "__init__.py")).read())
2018-12-19 11:19:07 +01:00
return result.group(1)
def get_readme(filename="README.md"):
2018-12-19 11:19:07 +01: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 11:19:07 +01:00
long_description = f.read()
return long_description
setup(
name=get_property("__project__", PACKAGE_NAME),
version=get_property("__version__", PACKAGE_NAME),
description=("Reviews ansible playbooks, roles and inventories and suggests improvements."),
keywords="ansible code review",
author=get_property("__author__", PACKAGE_NAME),
author_email=get_property("__email__", PACKAGE_NAME),
url="https://github.com/xoxys/ansible-later",
license=get_property("__license__", PACKAGE_NAME),
long_description=get_readme(),
2019-04-09 10:58:15 +02:00
long_description_content_type="text/markdown",
2019-04-25 14:22:41 +02:00
packages=find_packages(exclude=["*.tests", "tests", "tests.*"]),
2019-04-23 14:37:19 +02:00
package_data={"ansiblelater": ["data/*"]},
2019-04-09 10:58:15 +02:00
python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,,!=3.4.*",
2018-12-19 11:19:07 +01:00
classifiers=[
2019-04-09 10:58:15 +02: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 :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Utilities",
2018-12-19 11:19:07 +01:00
],
include_package_data=True,
zip_safe=False,
install_requires=[
"ansible",
"six",
2018-12-19 11:19:07 +01:00
"pyyaml",
"appdirs",
"unidiff",
"flake8",
"yamllint",
2019-03-22 10:24:40 +01:00
"nested-lookup",
2019-03-28 01:20:43 +01:00
"colorama",
"anyconfig",
"python-json-logger",
2019-04-11 14:18:11 +02:00
"jsonschema",
2019-04-12 14:01:03 +02:00
"pathspec",
"toolz"
2018-12-19 11:19:07 +01:00
],
entry_points={
2019-04-09 10:58:15 +02:00
"console_scripts": [
"ansible-later = ansiblelater.__main__:main"
2018-12-19 11:19:07 +01:00
]
},
test_suite="tests"
2018-12-19 11:19:07 +01:00
)