Closed lgarrison closed 2 years ago
I'll take a look!
@lgarrison: any reason why you switched to using intree_extensions
? The following diff (reverting a change you made) fixes it for me:
- ext_modules = intree_extensions(["src/nufft_ls/cpu.cpp"])
- ext_modules[0].include_dirs = ['include/']
- ext_modules[0].language = 'c++'
+ ext_modules = [
+ Pybind11Extension(
+ "nufft_ls.cpu", ["src/nufft_ls/cpu.cpp"], include_dirs=["include"]
+ )
+ ]
No particular reason! I was mostly just trying it because the docs suggested it was an option when you want to lay out your source files this way. (And I know I tried reverting that change while debugging this... will confirm the fix asap!)
And I guess I thought that those two formulations were supposed to be equivalent! Any idea why one would work and the other not? (To be clear, both work inside a venv for me)
Yeah the docs make it sound like they should be but perhaps the issue is with manually setting the include_dirs or something?
Ah, yeah, that's exactly what it was. I should have been appending to the include_dirs
. Thanks!
The pybind11 compilation fails because the
pybind11.h
include path is missing from the compiler invocation when installing inside a conda environment (first noticed this while debugging #7). When installing inside a venv, there doesn't seem to be any problem. The error message is:Full details:
@dfm any ideas? I've looked around for similar issue reports but can't find any. I'll try again from scratch with a dummy pybind11 project and see if the error persists...
Interestingly,
pip install pybind11
, which solved #7, does not solve the problem for me, nor does--no-build-isolation
.