aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-10-29 13:54:06 +0200
committerWojtek Kosior <koszko@koszko.org>2022-10-29 13:54:06 +0200
commitd7db0d187ccb4404fdf6f19fba15e0a39391640a (patch)
tree4c41764c51818587d797efe17abab2e94306ec48 /setup.py
downloadhydrilla-website-d7db0d187ccb4404fdf6f19fba15e0a39391640a.tar.gz
hydrilla-website-d7db0d187ccb4404fdf6f19fba15e0a39391640a.zip
initial commit
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/setup.py b/setup.py
new file mode 100755
index 0000000..3dc4989
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: CC0-1.0
+
+# Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org>
+#
+# Available under the terms of Creative Commons Zero v1.0 Universal.
+
+import setuptools
+
+from setuptools.command.build_py import build_py
+from setuptools.command.sdist import sdist
+from setuptools import Command
+
+from pathlib import Path
+
+here = Path(__file__).resolve().parent
+
+class CustomBuildCommand(build_py):
+ """The build command but runs babel before build."""
+ def run(self, *args, **kwargs):
+ """Wrapper around build_py's original run() method."""
+ self.run_command('compile_catalog')
+
+ super().run(*args, **kwargs)
+
+setuptools.setup(cmdclass = {'build_py': CustomBuildCommand})