meson-python: pip check fails due to dependency on ninja
Running pip check
inside a conda environment currently fails because meson-python depends on the PyPI version of ninja and cannot detect the actually installed ninja version from conda-forge.
❯ mamba list
# packages in environment at /home/awvwgk/software/opt/conda/envs/mesonpep517:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_gnu conda-forge
attrs 21.4.0 pyhd8ed1ab_0 conda-forge
auditwheel 5.1.2 py39hf3d152e_0 conda-forge
bzip2 1.0.8 h7f98852_4 conda-forge
ca-certificates 2022.5.18.1 ha878542_0 conda-forge
cffi 1.15.0 py39h4bc2ebd_0 conda-forge
dftd3 0.5.1 pypi_0 pypi
importlib-metadata 4.11.3 py39hf3d152e_1 conda-forge
iniconfig 1.1.1 pyh9f0ad1d_0 conda-forge
ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge
libblas 3.9.0 14_linux64_openblas conda-forge
libcblas 3.9.0 14_linux64_openblas conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libgcc-ng 11.2.0 h1d223b6_16 conda-forge
libgfortran-ng 11.2.0 h69a702a_16 conda-forge
libgfortran5 11.2.0 h5c6108e_16 conda-forge
libgomp 11.2.0 h1d223b6_16 conda-forge
liblapack 3.9.0 14_linux64_openblas conda-forge
libnsl 2.0.0 h7f98852_0 conda-forge
libopenblas 0.3.20 pthreads_h78a6416_0 conda-forge
libstdcxx-ng 11.2.0 he4da1e4_16 conda-forge
libuuid 2.32.1 h7f98852_1000 conda-forge
libzlib 1.2.11 h166bdaf_1014 conda-forge
meson 0.62.0 pyhd8ed1ab_0 conda-forge
meson-python 0.3.0 pypi_0 pypi
mesonpep517 0.2 pyhd8ed1ab_0 conda-forge
minpack 2.0.0 pypi_0 pypi
ncurses 6.3 h27087fc_1 conda-forge
ninja 1.10.2 h4bd325d_1 conda-forge
numpy 1.22.3 py39h18676bf_2 conda-forge
openssl 3.0.3 h166bdaf_0 conda-forge
packaging 21.3 pyhd8ed1ab_0 conda-forge
pep517 0.12.0 py39hf3d152e_2 conda-forge
pint 0.19.1 pyhd8ed1ab_0 conda-forge
pip 22.0.4 pyhd8ed1ab_0 conda-forge
pluggy 1.0.0 py39hf3d152e_3 conda-forge
py 1.11.0 pyh6c4a22f_0 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pydantic 1.9.0 py39hb9d737c_1 conda-forge
pyelftools 0.28 py39hf3d152e_2 conda-forge
pyparsing 3.0.8 pyhd8ed1ab_0 conda-forge
pytest 7.1.2 py39hf3d152e_0 conda-forge
python 3.9.12 h2660328_1_cpython conda-forge
python-build 0.7.0 pyhd8ed1ab_0 conda-forge
python_abi 3.9 2_cp39 conda-forge
qcelemental 0.24.0 pyhd8ed1ab_0 conda-forge
readline 8.1 h46c0cb4_0 conda-forge
setuptools 62.1.0 py39hf3d152e_0 conda-forge
sqlite 3.38.2 h4ff8645_0 conda-forge
tk 8.6.12 h27826a3_0 conda-forge
toml 0.10.2 pyhd8ed1ab_0 conda-forge
tomli 2.0.1 pyhd8ed1ab_0 conda-forge
typing-extensions 4.2.0 hd8ed1ab_1 conda-forge
typing_extensions 4.2.0 pyha770c72_1 conda-forge
tzdata 2022a h191b570_0 conda-forge
wheel 0.37.1 pyhd8ed1ab_0 conda-forge
xz 5.2.5 h516909a_1 conda-forge
zipp 3.8.0 pyhd8ed1ab_0 conda-forge
zlib 1.2.11 h166bdaf_1014 conda-forge
❯ pip check
meson-python 0.3.0 requires ninja, which is not installed.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 25 (18 by maintainers)
Meson does have an optional extra,
pip install 'meson[ninja]'
will also guarantee that ninja support is resolved via PyPI rather than being assumed to exist via the OS repositories. And it is frequently used by linux distros which do not install PyPI-repackaged versions of system C++ command-line tools, so it cannot be a hard dependency.meson-python is obviously making the tradeoff that
pip install foo
where foo is a package that utilizes this build backend, cannot work reliably if it cannot install ninja, and it cannot do that via pacman, emerge, dnf, apt, xbps… so better to install an extra copy than to break pip install. Obviously, this will mean distribution via channels that install ninja outside of pip, will need to patch meson-python to not depend on ninja.