-
Say, I have a Python project with tightly integrated C++ extensions, which can either by build and installed directly via meson or through mesonpy with pip install. I am currently writing a conda/rattler-build recipe for said project. Is there any reason to go through pip and meson-python over calling meson directly? I see 3 options for the recipe:
Option 1) installs the build dependencies via pip, which can be seen as undesirable in the conda ecosystem. Options 2) and 3) do not pull these dependencies via pip, so they must be provided by the build environment. Does meson-python do anything under the hood that justifies the additional complexity of option 2) over option 3)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Good question @llohse. For (1) and (2), you don't need the Hence, I recommend a plan
Yes, it does. It produces the project's metadata, which (after the wheel gets installed) will be installed into
|
Beta Was this translation helpful? Give feedback.
Good question @llohse. For (1) and (2), you don't need the
--no-deps --no-build-isolation
becauseconda-build
andrattler-build
will always enforce that option (see for example https://github.com/prefix-dev/rattler-build/blob/249d98f13c440a8edf0d99d2e0f1208ffca6047e/src/env_vars.rs#L236).Hence, I recommend a plan
python -m pip install .
, or (if you preferpypa/build
) something likepython -m build -wnx -Cbuild-dir=builddir
to build a wheel followed bypip install dist/*.whl
.-Cbuild-dir=builddir
can be handy for inspection and caching (works with pip as well).Yes, it does…