-
Notifications
You must be signed in to change notification settings - Fork 117
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
Potential fix for broken editable install #582
base: main
Are you sure you want to change the base?
Conversation
This looks like it would be pretty easy to test. We could add a test for #546 pretty easily, see if it breaks, then try with this fix. |
tests/samples/issue-546-editable-subproject/src/pkg/__init__.py
Outdated
Show resolved
Hide resolved
I can confirm that the test project here reproduces the issue for me with the latest skbuild release (this scenario of a pybind11 package with a pure python sub-package is in fact exactly the use case where I first encountered the issue). |
thanks for confirming @jwittbrodt ! |
But why is "test_classic_subproject" also failing? To me it looks like there still are some name mis-matches, from what I understand, only the editable install should fail? Adding the fix commented out here still fails on both. I think there's a path problem in the setup here that needs to be solved before this is helpful. |
I can't tell why it is failing in the workflow. It is working in my docker environment on ubuntu with the current scikit-build ( |
Okay, I'lll try to help fix this soon. I can try running that locally, then figuring out what is different. |
Looks like just the editable install is failing (at least on the one that has finished so far) :) I've fixed the actions so it should run when you make an edit without me having to click approve. |
Curious, it seems to be that Windows passes the non-editable install check, but Linux does not. Are you on Windows too? |
Thanks for lifting the restrictions! That should make testing faster. I am on a Windows machine but I am running the project in a ubuntu docker container (the test case with the dockerfile I am using is here: https://github.com/maichmueller/scikit_build_issue/blob/master/Dockerfile). Which workflow run that succeded do you mean? It seems to me that all have failed so far? PS |
All workflows fail, because the editable install fails. I'm mostly looking at the non-editable install, which I'd expect to work. It seems to work on Windows, but not Linux. This might be due to Python 2, which only runs on non-Windows. Still getting |
Have you tested the case locally to see if it installs the pkg correctly there (for both types of install)? |
So I have tested my fix now locally on my Ubuntu 20.04 (py38) station and saw it fix the issue.
How can I modify the code in a way that takes effect for the testcases? Without that, I can't quite dig any further into differences between my local setup and the test setup. |
I'll try to help soon-ish, but https://scikit-hep.org/developer/pytest#running-pytest describes how to debug with pytest. You can use I think there was a caching issue that I've just fixed with the test. |
The regular install works with/without, and the editable install does not work with or without the patch. :( |
possible broken editable install fix no copy of package_dir revert back to old package_dir setting and add henrii test copy paste error fix [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci update test project for breaking test case now a cpp extension add flake8 ignore for init.py [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci fix: py 2 (ugh) Update test_issue546_editable_subproject.py [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci pkg import statement fix try import of subpkg too pybind11 module rename to _pkg as well implement henry suggestions for init test verbose install cleaner pybind11 path search fix: uncomment workaround for issue fix: forgot to remove the original method fix: tests failed due to caching tests: minor cleanup tests: try no build isolation for editable install fix: do not remove added package dir [pre-commit.ci] pre-commit autoupdate (scikit-build#684) * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 22.1.0 → 22.3.0](psf/black@22.1.0...22.3.0) * tests: support latest setuptools change Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com> [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Update __init__.py Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
this small change in setuptools_wraps I believe fixes the broken editable install links due to the
src
directory of the package being set incorrectly (#579 and #546 ).I am unsure if this change holds other consequences for the scikit-build process, so this PR could also just be seen as a hint towards what direction of change would fix the issue if one of the maintainers wants to take this on themselves.