ansible-doctor/setup.py

69 lines
2.4 KiB
Python
Raw Normal View History

2020-04-11 11:25:56 +00:00
#!/usr/bin/env python3
2019-10-07 06:52:00 +00:00
"""Setup script for the package."""
import io
import os
import re
from setuptools import find_packages
from setuptools import setup
2019-10-07 06:52:00 +00:00
PACKAGE_NAME = "ansibledoctor"
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 21:19:07 +00:00
open(os.path.join(current_dir, project, "__init__.py")).read()
)
2019-10-07 06:52:00 +00:00
return result.group(1)
def get_readme(filename="README.md"):
this = os.path.abspath(os.path.dirname(__file__))
with io.open(os.path.join(this, filename), encoding="utf-8") as f:
long_description = f.read()
return long_description
setup(
name=get_property("__project__", PACKAGE_NAME),
version=get_property("__version__", PACKAGE_NAME),
description="Generate documentation from annotated Ansible roles using templates",
keywords="ansible role documentation",
author=get_property("__author__", PACKAGE_NAME),
author_email=get_property("__email__", PACKAGE_NAME),
2020-04-05 21:19:07 +00:00
url=get_property("__url__", PACKAGE_NAME),
2020-04-05 21:16:53 +00:00
license=get_property("__license__", PACKAGE_NAME),
2019-10-07 06:52:00 +00:00
long_description=get_readme(),
long_description_content_type="text/markdown",
2020-04-05 22:23:42 +00:00
packages=find_packages(exclude=["*.test", "test", "test.*"]),
2019-10-09 09:52:01 +00:00
include_package_data=True,
zip_safe=False,
2020-04-05 21:16:53 +00:00
python_requires=">=3.5,<4",
2019-10-07 06:52:00 +00:00
classifiers=[
2019-10-09 12:38:55 +00:00
"Development Status :: 5 - Production/Stable",
2019-10-07 06:52:00 +00:00
"Environment :: Console",
2020-04-05 21:16:53 +00:00
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
2019-10-07 06:52:00 +00:00
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"Natural Language :: English",
"Operating System :: POSIX",
2020-04-05 21:16:53 +00:00
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
2019-10-07 06:52:00 +00:00
"Topic :: Utilities",
"Topic :: Software Development",
"Topic :: Software Development :: Documentation",
],
install_requires=[
2020-04-05 21:19:07 +00:00
"ruamel.yaml", "appdirs", "colorama", "anyconfig", "pathspec", "python-json-logger",
"jsonschema", "jinja2", "environs", "nested-lookup"
2019-10-07 06:52:00 +00:00
],
2020-04-05 21:19:07 +00:00
entry_points={"console_scripts": ["ansible-doctor = ansibledoctor.__main__:main"]},
2019-10-07 06:52:00 +00:00
)