8000 BLD Improve make clean for edge case situations (#29413) · scikit-learn/scikit-learn@dd88e21 · GitHub
[go: up one dir, main page]

Skip to content

Commit dd88e21

Browse files
lestevebetatim
andauthored
BLD Improve make clean for edge case situations (#29413)
Co-authored-by: Tim Head <betatim@gmail.com>
1 parent ac96119 commit dd88e21

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# simple makefile to simplify repetitive build env management tasks under posix
22

33
PYTHON ?= python
4+
DEFAULT_MESON_BUILD_DIR = build/cp$(shell python -c 'import sys; print(f"{sys.version_info.major}{sys.version_info.minor}")' )
45

56
all:
67
@echo "Please use 'make <target>' where <target> is one of"
@@ -21,6 +22,11 @@ clean: clean-meson
2122

2223
clean-meson:
2324
pip uninstall -y scikit-learn
25+
# It seems in some cases removing the folder avoids weird compilation
26+
# errors (e.g. when switching from numpy>=2 to numpy<2). For some
27+
# reason ninja clean -C $(DEFAULT_MESON_BUILD_DIR) is not
28+
# enough
29+
rm -rf $(DEFAULT_MESON_BUILD_DIR)
2430

2531
dev-setuptools:
2632
$(PYTHON) setup.py build_ext -i

0 commit comments

Comments
 (0)
0