/
githubmirror
/
scikit-learn
Обзор
Документация
Войти
/
githubmirror
/
scikit-learn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
Makefile
27 строк
1 KB
Loïc Estève
MNT Fix 'make clean' for free-threaded Python (#32531)
20 окт 2025, 17:18
Не верифицирован
20 окт 2025, 17:18
f498ff2
Код
Авторство
О чём код?
# simple makefile to simplify repetitive build env management tasks under posix PYTHON ?= python DEFAULT_MESON_BUILD_DIR = build/cp$(shell python -c 'import sys, sysconfig; suffix = "t" if sysconfig.get_config_var("Py_GIL_DISABLED") else ""; print(f"{sys.version_info.major}{sys.version_info.minor}{suffix}")') all: @echo "Please use 'make <target>' where <target> is one of" @echo " dev build scikit-learn with Meson" @echo " clean clean scikit-learn Meson build. Very rarely needed," @echo " since meson-python recompiles on import." .PHONY: all dev: dev-meson dev-meson: pip install --verbose --no-build-isolation --editable . --config-settings editable-verbose=true clean: clean-meson clean-meson: pip uninstall -y scikit-learn # It seems in some cases removing the folder avoids weird compilation # errors (e.g. when switching from numpy>=2 to numpy<2). For some # reason ninja clean -C $(DEFAULT_MESON_BUILD_DIR) is not # enough. rm -rf $(DEFAULT_MESON_BUILD_DIR)