Skip to content

setup.py: use different hack to run compile_catalog earlier #1375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import re

from setuptools import setup, find_packages
from setuptools.command.build_py import build_py
from setuptools.command.build import build


PACKAGE_DATA = {
Expand Down Expand Up @@ -102,11 +102,11 @@ def find_version():
raise RuntimeError("Unable to find version string.")


# We piggyback the translation catalogs compilation onto build_py since
# We piggyback the translation catalogs compilation onto build since
# the po and mofiles will be part of the package data for cms.locale,
# which is collected at this stage.
class build_py_and_l10n(build_py):
sub_commands = [('compile_catalog', None)] + build_py.sub_commands
class build_with_l10n(build):
sub_commands = [('compile_catalog', None)] + build.sub_commands


setup(
Expand All @@ -118,7 +118,7 @@ class build_py_and_l10n(build_py):
description="A contest management system and grader for IOI-like programming competitions",
packages=find_packages(),
package_data=PACKAGE_DATA,
cmdclass={"build_py": build_py_and_l10n},
cmdclass={"build": build_with_l10n},
scripts=[
"scripts/cmsLogService",
"scripts/cmsScoringService",
Expand Down