setup.py 802 Bytes
Newer Older
1 2 3 4 5 6 7
from setuptools import setup, find_packages
from distutils.command.build import build
from setuptools.command.sdist import sdist


def webpack():
    import subprocess
8 9
    subprocess.check_call(['yarn', 'install'])
    subprocess.check_call(['yarn', 'build'])
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25


class Build(build):
    def run(self):
        webpack()
        super().run()


class Sdist(sdist):
    def run(self):
        webpack()
        super().run()


setup(
    name="zesje",
Joseph Weston's avatar
Joseph Weston committed
26
    version="0.1a",
27 28 29 30 31 32 33 34 35 36 37
    url="http://gitlab.kwant-project,org/zesje/zesje",
    description="",
    author="Zesje authors",
    author_email="anton.akhmerov@tudelft.nl",
    packages=find_packages('.'),
    cmdclass={'build': Build,
              'sdist': Sdist,
             },
    package_data={'zesje': ['static/*']},
    include_package_data=True,
)