setup.py 1.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/env python

import copy

from setuptools import setup
from setuptools.command.build_py import build_py


class BuildCmd(build_py):
    def run(self):
        # build foris plugin files
        from foris_plugins_distutils import build
        cmd = build(copy.copy(self.distribution))
14
        cmd.ensure_finalized()
15 16 17 18 19 20 21 22
        cmd.run()

        # build package
        build_py.run(self)


setup(
    name="Foris Netmetr Plugin",
Štěpán Henek's avatar
Štěpán Henek committed
23
    version="4.1",
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
    description="Netmetr plugin for foris web interfce",
    author="CZ.NIC, z. s. p. o.",
    author_email="stepan.henek@nic.cz",
    url="https://gitlab.labs.nic.cz/turris/foris-netmetr-plugin/",
    license="GPL-3.0",
    requires=[
        "foris",
    ],
    setup_requires=[
        'babel',
        'jinja2',
        'libsass',
        'foris_plugins_distutils',
    ],
    provides=[
        "foris_plugins.netmetr",
    ],
    packages=[
        "foris_plugins.netmetr",
    ],
    package_data={
        '': [
            "templates/**",
            "templates/**/*",
            "templates/javascript/**",
            "templates/javascript/**/*",
            "locale/**/LC_MESSAGES/*.mo",
            "static/css/*.css",
            "static/fonts/*",
            "static/img/*",
            "static/js/*.js",
            "static/js/contrib/*",
        ],
    },
    cmdclass={
        "build_py": BuildCmd,  # modify build_py to build the foris files as well
    }
)