Skip to content

Commit e710dfe

Browse files
committed
Inject subcommands into build_py
1 parent e5e4aef commit e710dfe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import subprocess
77

88
from setuptools import setup
9-
from distutils.command.build import build
9+
from distutils.command.build_py import build_py
1010

1111
try:
1212
from babel.messages import frontend as babel
@@ -122,23 +122,23 @@ def git_describe_to_python_version(version):
122122
vf.write(f'__version__ = "{version}"\n')
123123

124124

125-
cmdclass = {"build": build}
125+
cmdclass = {"build_py": build_py}
126126

127127
from bpython import package_dir, __author__
128128

129129
translations_dir = os.path.join(package_dir, "translations")
130130

131131
# localization options
132132
if using_translations:
133-
build.sub_commands.insert(0, ("compile_catalog", None))
133+
build_py.sub_commands.insert(0, ("compile_catalog", None))
134134

135135
cmdclass["compile_catalog"] = babel.compile_catalog
136136
cmdclass["extract_messages"] = babel.extract_messages
137137
cmdclass["update_catalog"] = babel.update_catalog
138138
cmdclass["init_catalog"] = babel.init_catalog
139139

140140
if using_sphinx:
141-
build.sub_commands.insert(0, ("build_sphinx_man", None))
141+
build_py.sub_commands.insert(0, ("build_sphinx_man", None))
142142
cmdclass["build_sphinx_man"] = BuildDoc
143143

144144
if platform.system() in ("FreeBSD", "OpenBSD"):

0 commit comments

Comments
 (0)