setup.package_files()   A
last analyzed

Complexity

Conditions 3

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 6
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
"""A simple Python 3 CLI to read your Things app data."""
2
3
import os
4
5
from setuptools import find_packages, setup  # type: ignore
6
7
8
def package_files(directory):
9
    """Automatically add data resources."""
10
    paths = []
11
    # pylint: disable=unused-variable
12
    for (path, _directories, filenames) in os.walk(directory):
13
        for filename in filenames:
14
            paths.append((directory, [os.path.join(path, filename)]))
15
    return paths
16
17
18
APP = ["things-cli"]
19
APP_NAME = "Things CLI"
20
AUTHOR = "Alexander Willner"
21
AUTHOR_MAIL = "[email protected]"
22
DESCRIPTON = "A simple Python 3 CLI to read your Things app data."
23
URL = "https://github.com/thingsapi/things-cli"
24
DATA_FILES = package_files("")
25
OPTIONS = {
26
    "argv_emulation": False,
27
}
28
29
30
with open("README.md", "r") as fh:
31
    LONG_DESRIPTION = fh.read()
32
33
setup(
34
    app=APP,
35
    author=AUTHOR,
36
    author_email=AUTHOR_MAIL,
37
    name="things-cli",
38
    description=DESCRIPTON,
39
    long_description=LONG_DESRIPTION,
40
    long_description_content_type="text/markdown",
41
    url=URL,
42
    packages=find_packages(),
43
    classifiers=[
44
        "Development Status :: 4 - Beta",
45
        "Programming Language :: Python :: 3",
46
        "License :: OSI Approved :: Apache Software License",
47
        "Operating System :: MacOS :: MacOS X",
48
        "Natural Language :: English",
49
    ],
50
    python_requires=">=3.6",
51
    data_files=DATA_FILES,
52
    options={"py2app": OPTIONS},
53
    setup_requires=["py2app"],
54
    entry_points={
55
        "console_scripts": [
56
            "things-cli = things_cli.cli:main",
57
        ]
58
    },
59
    install_requires=["things.py>=0.0.15", "argcomplete>=3.0.0"],
60
)
61