1
|
#!/usr/bin/env python3
|
2
|
# SPDX-License-Identifier: CC0-1.0
|
3
|
|
4
|
# Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org>
|
5
|
#
|
6
|
# Available under the terms of Creative Commons Zero v1.0 Universal.
|
7
|
|
8
|
import setuptools
|
9
|
|
10
|
from setuptools.command.build_py import build_py
|
11
|
|
12
|
class CustomBuildCommand(build_py):
|
13
|
'''
|
14
|
The build command but runs babel before build.
|
15
|
'''
|
16
|
def run(self, *args, **kwargs):
|
17
|
self.run_command('compile_catalog')
|
18
|
super().run(*args, **kwargs)
|
19
|
|
20
|
setuptools.setup(cmdclass={'build_py': CustomBuildCommand})
|