setup.py 2.05 KB
Newer Older
Bogdan Bodnar's avatar
Bogdan Bodnar committed
1
2
3
4
5
6
7
#  Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
#
#  This is free software, licensed under the GNU General Public License v3.
#  See /LICENSE for more information.

# !/usr/bin/env python3

Bogdan Bodnar's avatar
Bogdan Bodnar committed
8
9
10
import copy
import pathlib

Bogdan Bodnar's avatar
Bogdan Bodnar committed
11
import setuptools
Bogdan Bodnar's avatar
Bogdan Bodnar committed
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from setuptools.command.build_py import build_py

NAME = 'reforis_diagnostics'

BASE_DIR = pathlib.Path(__file__).absolute().parent


class CustomBuild(build_py):
    def run(self):
        # build package
        build_py.run(self)

        from reforis_distutils import ForisPluginBuild
        cmd = ForisPluginBuild(copy.copy(self.distribution))
        cmd.root_path = BASE_DIR
        cmd.module_name = NAME
        cmd.build_lib = self.build_lib
        cmd.ensure_finalized()
        cmd.run()

Bogdan Bodnar's avatar
Bogdan Bodnar committed
32
33

setuptools.setup(
Bogdan Bodnar's avatar
Bogdan Bodnar committed
34
    name=NAME,
Bogdan Bodnar's avatar
Bogdan Bodnar committed
35
    version='2.0.1',
Bogdan Bodnar's avatar
Bogdan Bodnar committed
36
37
38
    packages=setuptools.find_packages(exclude=['tests']),
    include_package_data=True,

Bogdan Bodnar's avatar
Bogdan Bodnar committed
39
    description='The reForis diagnostics plugin',
Bogdan Bodnar's avatar
Bogdan Bodnar committed
40
    long_description='',
Bogdan Bodnar's avatar
Bogdan Bodnar committed
41
42
    author='CZ.NIC, z. s. p. o.',
    author_email='bogdan.bodnar@nic.cz',
Bogdan Bodnar's avatar
Bogdan Bodnar committed
43
44
45

    # All versions are fixed just for case. Once in while try to check for new versions.
    install_requires=[
46
47
48
        'flask',
        'Babel',
        'Flask-Babel',
Bogdan Bodnar's avatar
Bogdan Bodnar committed
49
    ],
50
51
52
53
54
55
56
    extras_require={
        'devel': [
            'pytest==3.7.1',
            'pylint==2.3.1',
            'pycodestyle==2.5.0',
        ],
    },
Bogdan Bodnar's avatar
Bogdan Bodnar committed
57
58
59
60
61
62
    setup_requires=[
        'reforis_distutils',
    ],
    dependency_links=[
        "git+https://gitlab.labs.nic.cz/turris/reforis/reforis-distutils.git#egg=reforis-distutils",
    ],
Bogdan Bodnar's avatar
Bogdan Bodnar committed
63
    entry_points={
Bogdan Bodnar's avatar
Bogdan Bodnar committed
64
        'foris.plugins': f'{NAME} = {NAME}:diagnostics'
Bogdan Bodnar's avatar
Bogdan Bodnar committed
65
66
67
68
69
70
71
72
73
74
75
    },
    classifiers=[
        'Framework :: Flask',
        'Intended Audience :: Developers',
        'Development Status :: 3 - Alpha',
        'License :: Other/Proprietary License',
        'Natural Language :: English',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 3',
        'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
    ],
Bogdan Bodnar's avatar
Bogdan Bodnar committed
76
77
78
    cmdclass={
        'build_py': CustomBuild,
    },
Bogdan Bodnar's avatar
Bogdan Bodnar committed
79
80
    zip_safe=False,
)