Skip to content

Meson's editable installs overrides spin's own meson-based installation #143

@lagru

Description

@lagru

I am not sure if this is necessarily a bug but it seems like something that should be discussed and people be made aware about. This concerns the development setup of scikit-image but may generalize to any project that uses spin.

meson-python supports editable installs. However, these seem to override spin's path manipulation completely. E.g. for scikit-image, first follow Installing scikit-image for contributors (venv) and then run

spin python -- -c 'import skimage; print(skimage)'
pip install -vv --no-build-isolation -e .
spin python -- -c 'import skimage; print(skimage)'

the first spin python will find the module in REPO/build-install/... as expected. However, after running pip install -e the module is different: <module 'skimage' from 'REPO/skimage/__init__.py'>. Running pip uninstall -y scikit-image will restore the original and expected behavior of spin.

So using both meson-python's editable installs and spin together has the consequence that most spin commands trigger two compilations: once from spin build and once from the editable hook during import.

Ideally spin could make sure that build-install is always used regardless of an editable hook being present. But not sure if that's easily possible or feasible...

See also this thread on scikit-image's Zulip that triggered this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions