Skip to content

Document meson-python requirements on how import('python').find_installation() is called #233

Open

Description

@dnicolodi

meson-python invokes meson and meson may be run by a different Python interpreter than the one used to run meson-python via pip or build or other pep517 frontend. meson-python uses a native file to pass the python interpreter to build for to meson. AFAIK, this works only if a path to a Python interpreter is not explicitly passed as an argument to import('python').find_installation(). This should be documented.

Activity

  1. kif commented on Dec 10, 2022

    @kif

    +1:
    I was debugging an issue with multiple interpreter (python 3.10 + 3.11) on a "remote" architecture (i386 chroot on amd64 or armv7 on aarm64) outside of any virtual-env (for debian packaging) thus specifying the interpreter is very important to me.
    Having it documented is equally important.

  2. dnicolodi commented on Dec 10, 2022

    @dnicolodi
    MemberAuthor

    What issue did you encounter? meson-python works in the same way as other Python build tools work: the extensions are built for the interpreter running the build process.

  3. kif commented on Dec 27, 2022

    @kif

    I think debian is part of the problem since they did not yet move completely away from calling setup.py. The DD in charge of my packages (@picca) asked me to keep the distutils part for the year to come to be able to continue packaging them. Debian did neither package scipy 1.9.

    That said, I don't think illogical to have a way to say python=/usr/bin/pyhton310 or python=/usr/bin/python311. The same way I encountered a similar bug with cython not found since on debian, cython refers to the cython for python2 and one has to call cython3. Once again those are remarks for the documentation when packaging in the PEP517 spirit, and probably not bugs specific to meson-python.

  4. rgommers commented on Dec 30, 2022

    @rgommers
    Contributor

    Debian did neither package scipy 1.9.

    That was not because they can't use any other build system I believe. It was because (a) SciPy 1.9.0 wasn't quite robust enough, so I recommended downstream packagers to use the setup.py-based build for that release, and (b) Debian has an issue where they can only use a single setuptools version, and they unwisely chose the most recent release, leaving any projects that have issues with setuptools breaking compatibility with distutils out in the cold.

    This is a different issue though than the original topic of this issue.

  5. eli-schwartz commented on Jan 2, 2023

    @eli-schwartz
    Member

    The same way I encountered a similar bug with cython not found since on debian, cython refers to the cython for python2 and one has to call cython3.

    Since Meson 0.63.0, if you use the builtin cython language support it will search for both names: mesonbuild/meson@ebbe442

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions