CI: Try to ensure that poetry can find rust to build packages.

No, really:

```
IsolatedBuildInstallError
    Failed to install maturin>=1.2,<2.0.

    Output:
    Updating dependencies
    Resolving dependencies...

    Package operations: 1 install, 0 updates, 0 removals

      - Installing maturin (1.8.3)

    PEP517 build of a dependency failed

    Backend subprocess exited when trying to invoke build_wheel

        | Command '['/tmp/tmp0qxx7olq/.venv/bin/python', '/root/.local/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py', 'build_wheel', '/tmp/tmpu1wwwrff']' returned non-zero exit status 1.
        |
        | /tmp/tmp0qxx7olq/.venv/lib/python3.11/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
        | !!
        |
        |         ********************************************************************************
        |         Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).
        |
        |         By 2026-Feb-18, you need to update your project and remove deprecated calls
        |         or your builds will no longer be supported.
        |
        |         See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
        |         ********************************************************************************
        |
        | !!
        |   corresp(dist, value, root_dir)
        | running bdist_wheel
        | running build
        | running build_py
        | creating build/lib.freebsd-14.2-RELEASE-amd64-cpython-311/maturin
        | copying maturin/__init__.py -> build/lib.freebsd-14.2-RELEASE-amd64-cpython-311/maturin
        | copying maturin/__main__.py -> build/lib.freebsd-14.2-RELEASE-amd64-cpython-311/maturin
        | running egg_info
        | writing maturin.egg-info/PKG-INFO
        | writing dependency_links to maturin.egg-info/dependency_links.txt
        | writing requirements to maturin.egg-info/requires.txt
        | writing top-level names to maturin.egg-info/top_level.txt
        | reading manifest file 'maturin.egg-info/SOURCES.txt'
        | reading manifest template 'MANIFEST.in'
        | warning: no files found matching '*.json' under directory 'src/python_interpreter'
        | writing manifest file 'maturin.egg-info/SOURCES.txt'
        | running build_ext
        | running build_rust
        | error: can't find Rust compiler
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2025-04-11 17:40:43 +09:30
parent 0aa0efc989
commit e320c21948

View File

@@ -45,11 +45,11 @@ jobs:
python3.10 -m ensurepip
python3.10 -m pip install --upgrade pip
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly-2024-11-28
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
run: |
PATH=/root/.local/bin:$PATH
PATH=/root/.local/bin:$PATH:/root/.cargo/bin; export PATH
pip install --user -U wheel pip
pip3 install --user poetry
poetry install