summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-statsmodels/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/py-statsmodels/package.py')
-rw-r--r--var/spack/repos/builtin/packages/py-statsmodels/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-statsmodels/package.py b/var/spack/repos/builtin/packages/py-statsmodels/package.py
index 10cc6c39cc..c99901d9ae 100644
--- a/var/spack/repos/builtin/packages/py-statsmodels/package.py
+++ b/var/spack/repos/builtin/packages/py-statsmodels/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
from spack.package import *
@@ -50,6 +52,13 @@ class PyStatsmodels(PythonPackage):
depends_on("py-pytest", type="test")
+ @run_before("install")
+ def remove_generated_sources(self):
+ # Automatic recythonization doesn't work here, because cythonize is called
+ # with force=False by default, so remove generated C files manually.
+ for f in find(".", "*.c"):
+ os.unlink(f)
+
@run_after("install")
@on_package_attributes(run_tests=True)
def build_test(self):