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

feat: build directory setting & reuse #181

Merged
merged 7 commits into from
Jan 30, 2023
Merged

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Jan 27, 2023

Support for custom build directory, opt-in. Using FORCE for the moment. Doesn't try to rewrite the paths for moving CMake yet, but the info for this is there in the new json file.

Maybe this shouldn't have a cmake. prefix? Edit: yes, looks like we could sync-up with meson-python if we just use build-dir, so let's go with that. See mesonbuild/meson-python#275 for builddir -> build-dir there.

  • TODO: this should be able to (maybe via substitution?) have a unique path per interpreter.

Might adjust this later. My thought is we can make this opt-in for now, then if we make it opt-out, we can protect the change on a minimum version selection.

@codecov
Copy link

codecov bot commented Jan 27, 2023

Codecov Report

Merging #181 (9479c50) into main (10f9a59) will decrease coverage by 0.25%.
The diff coverage is 73.07%.

@@            Coverage Diff             @@
##             main     #181      +/-   ##
==========================================
- Coverage   89.43%   89.18%   -0.25%     
==========================================
  Files          44       44              
  Lines        1865     1887      +22     
==========================================
+ Hits         1668     1683      +15     
- Misses        197      204       +7     
Impacted Files Coverage Δ
src/scikit_build_core/builder/builder.py 95.45% <ø> (ø)
src/scikit_build_core/cmake.py 82.26% <69.56%> (-2.86%) ⬇️
src/scikit_build_core/build/wheel.py 91.30% <100.00%> (+0.07%) ⬆️
src/scikit_build_core/settings/skbuild_model.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@henryiii
Copy link
Collaborator Author

henryiii commented Jan 27, 2023

This still doesn't provide any benefit, since the Python directories change between invocations. We could either sed one for the other, or we could declare that only non-isolated builds can benefit (at least the changing paths isn't breaking anything).

Edit: There was a mistake. Now provides full benefit for non-isolated builds. Isolated builds get partial benefit (things like moving source files via pybind11 still cause rebuilds AFAICT).

@henryiii henryiii marked this pull request as ready for review January 27, 2023 18:25
@henryiii henryiii marked this pull request as draft January 28, 2023 03:25
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii henryiii force-pushed the henryiii/feat/builddir branch from 8e6033e to 9479c50 Compare January 30, 2023 16:29
@henryiii henryiii marked this pull request as ready for review January 30, 2023 16:36
@henryiii henryiii enabled auto-merge (squash) January 30, 2023 16:56
@henryiii henryiii merged commit d64e68f into main Jan 30, 2023
@henryiii henryiii deleted the henryiii/feat/builddir branch January 30, 2023 17:00
@henryiii henryiii modified the milestone: v0.2.0 Feb 14, 2023
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

Successfully merging this pull request may close these issues.

1 participant