Skip to content

Python: fix cross-compilation of extension modules #53320

@FRidh

Description

@FRidh

Issue description

The changes in #53123 improve the cross-compilation situation of Python. It's now possible to produce functioning cross-compiled Python packages.

Neither the interpreter nor the packages will depend on the build machine. It does involve in both the interpreter and wrapPythonPrograms an ugly hack to rewrite shebangs from build Python to host Python. This is a general issue discussed in #33956. In this case I think we should somehow instruct distutils of our host Python.

Cross-compiling extension modules still fails. In the interpreter build we've nuked references to the compiler, and that seems to be an issue. When not cross-compiling, all goes fine though.

Steps to reproduce

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    6.topic: cross-compilationBuilding packages on a different platform than they will be used on6.topic: pythonPython is a high-level, general-purpose programming language.
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions