From dcab61e45444ed9df2c07e6c82182cf6f7e27211 Mon Sep 17 00:00:00 2001 From: ahbarnett Date: Fri, 25 Oct 2024 16:57:21 -0400 Subject: [PATCH] makefile: pass DUCC option to Python sk-build via CMAKE_ARGS in pip --- makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index c9754a376..7ba042bc7 100644 --- a/makefile +++ b/makefile @@ -98,6 +98,8 @@ ifeq ($(FFT),DUCC) DUCC_SRCS := $(DUCC_OBJS:.o=.cc) # FINUFFT's switchable FFT done via this compile directive... CXXFLAGS += -DFINUFFT_USE_DUCC0 +# tell Python skbuild also to use DUCC (note wrapping in quotes)... + PY_CMAKE_ARGS := "-DFINUFFT_USE_DUCC0=ON" else # link against FFTW3 single-threaded (leaves DUCC_OBJS and DUCC_SETUP undef) LIBSFFT += -l$(FFTWNAME) -l$(FFTWNAME)f @@ -422,7 +424,8 @@ endif # python --------------------------------------------------------------------- python: $(STATICLIB) $(DYNLIB) - FINUFFT_DIR=$(FINUFFT) $(PYTHON) -m pip -v install python/finufft +# note use of CMAKE_ARGS which needs quotes; see scikit-build docs... + FINUFFT_DIR=$(FINUFFT) CMAKE_ARGS=$(PY_CMAKE_ARGS) $(PYTHON) -m pip -v install python/finufft # note to devs: if trouble w/ NumPy, use: pip install ./python --no-deps $(PYTHON) python/finufft/test/run_accuracy_tests.py $(PYTHON) python/finufft/examples/simple1d1.py