From c6d4f5ffeffc9d1f6c2b195369b1e842a9629b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Dlouh=C3=BD?= Date: Tue, 12 Jan 2021 11:41:19 +0100 Subject: [PATCH] compile resources during setup --- setup.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d9b602e..d868da5 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,14 @@ import os -from setuptools import setup, find_packages +import subprocess + +import setuptools.command.build_py +from setuptools import find_packages, setup + + +class CompileInstall(setuptools.command.build_py.build_py): + def run(self): + os.system("make fetch-static-libs build-css build-js") + setuptools.command.build_py.build_py.run(self) def read_file(filename): @@ -43,5 +52,6 @@ def read_file(filename): ], long_description=read_file('README.rst'), test_suite="runtests.runtests", + cmdclass={'build_py': CompileInstall}, zip_safe=False, # because we're including media that Django needs )