Passed
Push — master ( f4e57c...929827 )
by Cyb3r
01:59 queued 11s
created

setup.read()   A

Complexity

Conditions 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
"""Sets up PyStalk to be installed"""
2
import os
3
from setuptools import setup, find_packages
4
from MetaStalk import __version__, __author__
5
6
7
def read(fname) -> str:
8
    """Reads the fname file.
9
    Used to read the README.MD file"""
10
    return open(os.path.join(os.path.dirname(__file__), fname)).read()
11
12
13
def get_requirements(fname: str) -> list:
14
    """get_requirements
15
16
    Arguments:
17
        fname {str} -- The name of the requirements file.
18
19
    Returns:
20
        list -- List of requirements
21
    """
22
    with open(f"{fname}.txt") as f:
23
        return f.read().splitlines()
24
25
26
setup(
27
    name="MetaStalk",
28
    version=__version__,
29
    author=__author__,
30
    author_email="[email protected]",
31
    install_requires=get_requirements("requirements"),
32
    extra_requires={
33
        "dev": get_requirements("requirements-dev"),
34
        "image": [
35
            "psutil >= 5.7.0",
36
            "requests >= 2.23.0"
37
        ]
38
    },
39
    description="Metadata analyzer and visualizer",
40
    license="MPL 2.0",
41
    python_requires=">=3.6",
42
    packages=find_packages(exclude=["tests"]),
43
    package_data={'MetaStalk': ['utils/assets/*']},
44
    include_package_data=True,
45
    long_description=read('README.md'),
46
    long_description_content_type='text/markdown',
47
    entry_points={
48
        "console_scripts": ["metastalk=MetaStalk.main:start"]
49
    },
50
    url="https://gitlab.com/Cyb3r-Jak3/MetaStalk",
51
    project_urls={
52
        "Issues": "https://gitlab.com/Cyb3r-Jak3/MetaStalk/issues",
53
        "Source": "https://gitlab.com/Cyb3r-Jak3/MetaStalk/-/tree/master",
54
        "CI": "https://gitlab.com/Cyb3r-Jak3/MetaStalk/pipelines"
55
    },
56
    classifiers=[
57
        "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
58
        "Operating System :: OS Independent",
59
        "Natural Language :: English",
60
        "Programming Language :: Python :: 3.6",
61
        "Programming Language :: Python :: 3.7",
62
        "Programming Language :: Python :: 3.8",
63
        "Programming Language :: Python :: 3 :: Only",
64
        "Development Status :: 5 - Production/Stable",
65
        "Environment :: Console",
66
        "Topic :: Scientific/Engineering :: Information Analysis",
67
        "Topic :: Utilities"
68
    ]
69
)
70