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

Support PEP660 (pip install --editable) #171

Closed
LecrisUT opened this issue Jan 15, 2023 · 2 comments
Closed

Support PEP660 (pip install --editable) #171

LecrisUT opened this issue Jan 15, 2023 · 2 comments

Comments

@LecrisUT
Copy link
Collaborator

LecrisUT commented Jan 15, 2023

It might be enough to just wrap build_editable to setuptools one.

Just to make sure this works we should check that:

  • a) Changing the python file should be reflected in the execution
  • b) Updating on change of C source is outside of the scope of editable installs
  • c) C built module libraries, etc. are installed in the correct python source folder. Maybe this can be exposed to user on CMake side so that they can be hooked correctly
@henryiii
Copy link
Collaborator

Duplicate of #114. There are several things needed. Though a) yes, I think we can do that, b) We should be able to do this too (see meson-python's support) - though it would likely be under a configuration option), and c) a bit tricky, we can either try to put everything in source or have a custom loader - the latter unfortunately doesn't produce the right paths for coverage and such tools.

We really need #164 first, though. Users will expect an editable install to not rebuild everything every time.

Also, I'm prioritizing the PEP 517 mode (no setupools). With the setuptools module, maybe we can wrap build_editiable, I'm not sure. That also just might not be supported, with users requested to use the native support if they want editable installs. :)

@LecrisUT
Copy link
Collaborator Author

I think it is worth shipping out these features gradually:

  1. A simpler wrapper around an existing build_editable (e.g. setuptools) that does not do b) or c) yet, just allows the project to be installed via pip install -e and symlinks the python code. The dev would be responsible to do b) and c) manually
  2. Implement c) within python. Preferably it should not be dependent on cmake because some devs might have a pip independent dev build that does not call scikit-build-core. This would mostly simplify the initial setup
  3. Go beyond and make it interact with cmake for b)

The key is that even with the simple setuptools wrapper, it is already more convenient for developers to debug.

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

2 participants