Passed
Push — master ( 31e0c5...d70f3d )
by Alexander
03:39 queued 01:44
created

setup   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 74
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 59
dl 0
loc 74
rs 10
c 0
b 0
f 0
wmc 3

1 Function

Rating   Name   Duplication   Size   Complexity  
A package_files() 0 8 3
1
"""
2
KanbanView configuration file for py2app and pipy.
3
"""
4
5
import os
6
from setuptools import setup, find_packages  # type: ignore
7
8
9
def package_files(directory):
10
    """Automatically add data resources."""
11
    paths = []
12
    # pylint: disable=unused-variable
13
    for (path, directories, filenames) in os.walk(directory):
14
        for filename in filenames:
15
            paths.append((directory, [os.path.join(path, filename)]))
16
    return paths
17
18
19
APP = ['bin/things-app']
20
APP_NAME = "KanbanView"
21
AUTHOR = "Alexander Willner"
22
AUTHOR_MAIL = "[email protected]"
23
DESCRIPTON = "A simple read-only CLI, API and Web Service for Things 3"
24
URL = "https://kanbanview.app"
25
VERSION = "2.5.0"
26
DATA_FILES = package_files('resources')
27
OPTIONS = {
28
    'argv_emulation': False,
29
    'iconfile': 'resources/icon.icns',
30
    'plist': {'CFBundleName': APP_NAME,
31
              'CFBundleDisplayName': APP_NAME,
32
              'CFBundleGetInfoString': APP_NAME,
33
              'CFBundleIdentifier': "ws.willner.kanbanview",
34
              'CFBundleVersion': VERSION,
35
              'LSApplicationCategoryType': "public.app-category.productivity",
36
              'LSMinimumSystemVersion': "10.13.0",
37
              'NSHumanReadableCopyright': 'Copyright 2020 ' + AUTHOR},
38
    'optimize': '2'
39
}
40
41
42
with open("README.md", "r") as fh:
43
    LONG_DESRIPTION = fh.read()
44
45
setup(
46
    app=APP,
47
    author=AUTHOR,
48
    author_email=AUTHOR_MAIL,
49
    name="things3-api",
50
    description=DESCRIPTON,
51
    long_description=LONG_DESRIPTION,
52
    long_description_content_type="text/markdown",
53
    url=URL,
54
    packages=find_packages(),
55
    classifiers=[
56
        "Development Status :: 4 - Beta",
57
        "Programming Language :: Python :: 3",
58
        "License :: OSI Approved :: Apache Software License",
59
        "Operating System :: MacOS :: MacOS X",
60
        "Environment :: Console",
61
        "Framework :: Flask",
62
        "Natural Language :: English"
63
    ],
64
    python_requires='>=3.6',
65
    version=VERSION,
66
    data_files=DATA_FILES,
67
    options={'py2app': OPTIONS},
68
    setup_requires=['py2app'],
69
    entry_points={
70
        'console_scripts': [
71
            'things-cli = things3.things3_cli:main',
72
            'things-api = things3.things3_api:main',
73
            'things-kanban = things3.things3_app:main'
74
        ]
75
    }
76
)
77