How to build this package in place ?
Closed this issue · 4 comments
Thanks for the great examples and sorry for the naive question, but I am not a python packaging expert, but when I do:
$ pip install -e .
Obtaining file:///home/gailuron/workspace/formations/scikit_build_example
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
ERROR: Project file:///home/gailuron/workspace/formations/scikit_build_example has a 'pyproject.toml' and its build backend is missing the 'build_editable' hook. Since it does not have a 'setup.py' nor a 'setup.cfg', it cannot be installed in editable mode. Consider using a build backend that supports PEP 660.
And I don't know where to start to fix this error.
Maybe proposing a setup.py like this one. But the information are quite redundant with the pyproject.toml.
scikit-build-core does not support editable installs yet. See scikit-build/scikit-build-core#114. It's one of the next features I'm planning on working on, but it's not supported yet.
If you set build-dir
, you can get a persistent build dir, which will greatly reduce rebuild times, which might be partially what you are looking for.
Thanks for the quick answer, I will give it a try.
@henryiii Hello henryiii, how to specify build-dir
?
Tried pip install --help | grep build
, pip wheel --help | grep build
, still no idea how to setup build dir to just ./build
.
It's a feature of the build backend (scikit-build-core, in this case). You can do -Cbuild-dir=build
for either pip
or build
, or you can set in pyproject.toml:
[tool.scikit-build]
build-dir = "build"
(though, if setting in pyproject.toml, I'd use "build/{wheel_tag}"
, since otherwise different versions of Python will share the same build directory).
See https://scikit-build-core.readthedocs.io/en/latest/configuration.html#other-options.