-
Notifications
You must be signed in to change notification settings - Fork 20
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
Detect when a conflicting editable install exists #150
Conversation
This seems right to me. It seems to me that use of The NumPy docs spell it out very clearly right now (see note above https://numpy.org/devdocs/building/index.html#customizing-builds): ![]() |
spin/cmds/meson.py
Outdated
|
||
try: | ||
dist = importlib_metadata.Distribution.from_name(package) | ||
if dist.origin.dir_info.editable: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this also raise a different warning if a non-editable but installed distribution is detected? Possibly outside the directory expected by spin? That might lead to similar confusion.
Looks like an improvement otherwise! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fortunately, a non-editable installation does not cause problems.
The editable installs are particularly obnoxious, because their hooks are run before the PYTHONPATH takes effect.
Since we now have a way to detect editable installs, we could potentially switch build and PYTHONPATH-setting to no-ops if the editable matches the current directory. I'll look into that as a follow-up PR. |
Closes #143
I'd like to check with @rgommers that this won't impact the workflow of those using editable packages. Do those users also use spin? If so, should we more explicitly accommodate editable installs, and simply skip the build step?