Skip to content

Commit df6a896

Browse files
authored
setup.py: use different hack to run compile_catalog earlier (#1375)
my previous attempt at this didn't actually work (the files were still not added to the file list properly), i didn't notice because i already had the compiled .mo files in my source directory.
1 parent 104a824 commit df6a896

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import re
3333

3434
from setuptools import setup, find_packages
35-
from setuptools.command.build_py import build_py
35+
from setuptools.command.build import build
3636

3737

3838
PACKAGE_DATA = {
@@ -102,11 +102,11 @@ def find_version():
102102
raise RuntimeError("Unable to find version string.")
103103

104104

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

111111

112112
setup(
@@ -118,7 +118,7 @@ class build_py_and_l10n(build_py):
118118
description="A contest management system and grader for IOI-like programming competitions",
119119
packages=find_packages(),
120120
package_data=PACKAGE_DATA,
121-
cmdclass={"build_py": build_py_and_l10n},
121+
cmdclass={"build": build_with_l10n},
122122
scripts=[
123123
"scripts/cmsLogService",
124124
"scripts/cmsScoringService",

0 commit comments

Comments
 (0)