Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makefile: pass DUCC option to Python sk-build via CMAKE_ARGS in pip #586

Merged
merged 2 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -115,9 +117,10 @@ ifneq ($(OMP),OFF)
MFLAGS += $(MOMPFLAGS)
OFLAGS += $(OOMPFLAGS)
LIBS += $(OMPLIBS)
LIBSFFT += $(OMPLIBS)
# fftw3 multithreaded libs...
ifneq ($(FFT),DUCC)
LIBSFFT += -l$(FFTWNAME)_$(FFTWOMPSUFFIX) -l$(FFTWNAME)f_$(FFTWOMPSUFFIX) $(OMPLIBS)
LIBSFFT += -l$(FFTWNAME)_$(FFTWOMPSUFFIX) -l$(FFTWNAME)f_$(FFTWOMPSUFFIX)
endif
endif

Expand Down Expand Up @@ -422,7 +425,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
Expand Down
2 changes: 1 addition & 1 deletion python/finufft/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ build-backend = "scikit_build_core.build"
name = "finufft"
readme = "README.md"
requires-python = ">=3.8"
dependencies = ["numpy >= 1.12.0"]
dependencies = ["numpy >= 1.12.0", "packaging"]
authors = [
{name = "Jeremy Magland"},
{name = "Daniel Foreman-Mackey"},
Expand Down
Loading