| 1 |
#!/usr/bin/env python |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
|
| 4 |
import ast |
| 5 |
from io import open |
| 6 |
import re |
| 7 |
import sys |
| 8 |
|
| 9 |
from setuptools import find_packages, setup |
| 10 |
|
| 11 |
_version_re = re.compile(r"__version__\s+=\s+(.*)") |
| 12 |
|
| 13 |
with open("cli_helpers/__init__.py", "rb") as f: |
| 14 |
version = str( |
| 15 |
ast.literal_eval(_version_re.search(f.read().decode("utf-8")).group(1)) |
| 16 |
) |
| 17 |
|
| 18 |
|
| 19 |
def open_file(filename): |
| 20 |
"""Open and read the file *filename*.""" |
| 21 |
with open(filename) as f: |
| 22 |
return f.read() |
| 23 |
|
| 24 |
|
| 25 |
readme = open_file("README.rst") |
| 26 |
|
| 27 |
setup( |
| 28 |
name="cli_helpers", |
| 29 |
author="dbcli", |
| 30 |
author_email="[email protected]", |
| 31 |
version=version, |
| 32 |
url="https://github.com/dbcli/cli_helpers", |
| 33 |
packages=find_packages(exclude=["docs", "tests", "tests.tabular_output"]), |
| 34 |
include_package_data=True, |
| 35 |
description="Helpers for building command-line apps", |
| 36 |
long_description=readme, |
| 37 |
long_description_content_type="text/x-rst", |
| 38 |
install_requires=[ |
| 39 |
"configobj >= 5.0.5", |
| 40 |
"tabulate[widechars] ~= 0.10.0", |
| 41 |
], |
| 42 |
extras_require={ |
| 43 |
"styles": ["Pygments >= 1.6"], |
| 44 |
}, |
| 45 |
python_requires=">=3.6", |
| 46 |
classifiers=[ |
| 47 |
"Intended Audience :: Developers", |
| 48 |
"License :: OSI Approved :: BSD License", |
| 49 |
"Operating System :: Unix", |
| 50 |
"Programming Language :: Python", |
| 51 |
"Programming Language :: Python :: 3", |
| 52 |
"Programming Language :: Python :: 3.6", |
| 53 |
"Programming Language :: Python :: 3.7", |
| 54 |
"Topic :: Software Development", |
| 55 |
"Topic :: Software Development :: Libraries :: Python Modules", |
| 56 |
"Topic :: Terminals :: Terminal Emulators/X Terminals", |
| 57 |
], |
| 58 |
) |