wagtail/setup.py

24 wiersze
538 B
Python
Czysty Zwykły widok Historia

import subprocess
2014-02-03 17:14:46 +00:00
from setuptools import setup
from setuptools.command.sdist import sdist as base_sdist
2014-02-03 17:14:46 +00:00
class sdist(base_sdist):
def compile_assets(self):
try:
subprocess.check_call(["npm", "run", "build"])
except (OSError, subprocess.CalledProcessError) as e:
print("Error compiling assets: " + str(e)) # noqa: T201
raise SystemExit(1)
def run(self):
self.compile_assets()
base_sdist.run(self)
2014-02-03 17:14:46 +00:00
setup(
2022-02-14 13:25:00 +00:00
name="wagtail",
cmdclass={"sdist": sdist},
2014-02-07 15:39:59 +00:00
)