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

How to build this package in place ? #70

Closed
VincentRouvreau opened this issue Feb 24, 2023 · 4 comments
Closed

How to build this package in place ? #70

VincentRouvreau opened this issue Feb 24, 2023 · 4 comments

Comments

@VincentRouvreau
Copy link

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.

@henryiii
Copy link
Collaborator

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.

@VincentRouvreau
Copy link
Author

Thanks for the quick answer, I will give it a try.

@district10
Copy link

@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.

@henryiii
Copy link
Collaborator

henryiii commented Nov 27, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants