diff --git a/python-sphinxcontrib-htmlhelp.spec b/python-sphinxcontrib-htmlhelp.spec
index c6fd5f2..54e9f6c 100644
--- a/python-sphinxcontrib-htmlhelp.spec
+++ b/python-sphinxcontrib-htmlhelp.spec
@@ -23,10 +23,6 @@ BuildRequires: gettext
BuildRequires: python%{python3_pkgversion}-devel
-%generate_buildrequires
-%pyproject_buildrequires %{?with_tests: -x test}
-
-
%description
sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files.
@@ -43,6 +39,10 @@ sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files.
find -name '*.mo' -delete
+%generate_buildrequires
+%pyproject_buildrequires %{?with_tests: -x test}
+
+
%build
for po in $(find -name '*.po'); do
msgfmt --output-file=${po%.po}.mo ${po}