You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Possibly realted to the Port of the build system to Meson #26621. Ping @QuLogic
Code for reproduction
# standard installation procedure according to:# https://matplotlib.org/stable/devel/development_setup.html#create-a-dedicated-environmentcondaenvcreate-fenvironment.ymlcondaactivatempl-devpython-mpipinstall-e .
python-c"import matplotlib; print(matplotlib.__file__)"
Note: A non-editable install python -m pip install . works.
Actual outcome
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1138, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1078, in _find_spec
File "/home/tim/anaconda3/envs/mpl-dev/lib/python3.11/site-packages/_matplotlib_editable_loader.py", line 271, in find_spec
tree = self.rebuild()
^^^^^^^^^^^^^^
File "/home/tim/anaconda3/envs/mpl-dev/lib/python3.11/site-packages/_matplotlib_editable_loader.py", line 312, in rebuild
subprocess.run(self._build_cmd, cwd=self._build_path, env=env, stdout=stdout, check=True)
File "/home/tim/anaconda3/envs/mpl-dev/lib/python3.11/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/tim/anaconda3/envs/mpl-dev/bin/ninja']' returned non-zero exit status 1.```
yes, downside of meson is that you need --no-build-isolation for editable installs, upside is that it will recompile on import, so you need to do it less often (though bisecting across the build system change may get interesting....)
We could guess based on the build directory location, but a dev could set an arbitrary build directory, so I think maybe that would be a good question for meson-python?
Activity
jklymak commentedon Oct 5, 2023
@timhoffm You need the dev version of the install docs: https://matplotlib.org/devdocs/devel/development_setup.html
timhoffm commentedon Oct 5, 2023
🐑 (muscle memory)
Thanks @jklymak
ksunden commentedon Oct 5, 2023
yes, downside of meson is that you need
--no-build-isolationfor editable installs, upside is that it will recompile on import, so you need to do it less often (though bisecting across the build system change may get interesting....)timhoffm commentedon Oct 5, 2023
Is it (easily) possible for us to detect a missing
--no-build-isolationeditable install and warn on that?QuLogic commentedon Oct 5, 2023
We could guess based on the build directory location, but a dev could set an arbitrary build directory, so I think maybe that would be a good question for meson-python?
QuLogic commentedon Oct 5, 2023
Also, other packages have used a helper script of a sort, like
spin, which we might consider.timhoffm commentedon Oct 5, 2023
I've now asked at mesonbuild/meson-python#512