Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build (build.script) is not executed anymore with poetry-core 1.5.0 #7474

Closed
4 tasks done
mgorny opened this issue Feb 5, 2023 · 2 comments
Closed
4 tasks done

build (build.script) is not executed anymore with poetry-core 1.5.0 #7474

mgorny opened this issue Feb 5, 2023 · 2 comments
Labels
status/duplicate Duplicate issues

Comments

@mgorny
Copy link

mgorny commented Feb 5, 2023

  • Poetry version: poetry-core 1.5.0

  • Python version: 3.11.1

  • OS version and name: Gentoo Linux amd64

  • pyproject.toml: https://github.com/matrix-org/synapse/blob/develop/pyproject.toml

  • I am on the latest stable Poetry version, installed using a recommended method.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • I have consulted the FAQ and blog for any relevant entries or release notes.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

The linked pyproject.toml uses the following key in its pyproject.toml:

[tool.poetry]
build = "build_rust.py"

If it is restricted to poetry-core < 1.5, the build script seems to be executed correctly:

$ python -m build -w
* Creating virtualenv isolated environment...
* Installing packages in isolated environment... (poetry-core>=1.0.0,<1.5, setuptools_rust>=1.3,<=1.5.2)
* Getting build dependencies for wheel...
* Building wheel...
A setup.py file already exists. Using it.
running build
running build_py
running build_ext
running build_rust
cargo rustc --lib --message-format=json-render-diagnostics --manifest-path rust/Cargo.toml --release -v --features pyo3/extension-module -- --crate-type cdylib
    Updating crates.io index
[...]

However, with 1.5.0 it seems to be no longer executed:

$ python -m build -w
* Creating virtualenv isolated environment...
* Installing packages in isolated environment... (poetry-core>=1.0.0, setuptools_rust>=1.3,<=1.5.2)
* Getting build dependencies for wheel...
* Building wheel...
Successfully built matrix_synapse-1.76.0-cp311-cp311-manylinux_2_36_x86_64.whl

I thought that perhaps it's because the project is using the legacy key but I get the same result after changing it to:

[tool.poetry.build]
script = "build_rust.py"

I couldn't find anything in 1.5.0 changelog, nor anything stands out in git diff.

That said, this is not my project, and I don't see this documented on https://python-poetry.org/docs/pyproject/, so I'm not even sure if this was supposed to work with poetry-core in the first place.

The problem has also been reported to matrix-org/synapse#14966. I've hit a very similar problem in cdgriffith/Box#244.

@mgorny mgorny added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 5, 2023
@mgorny
Copy link
Author

mgorny commented Feb 5, 2023

My search foo was poor, I see #7470 now. Sorry for the noise!

@mgorny mgorny closed this as not planned Won't fix, can't repro, duplicate, stale Feb 5, 2023
@neersighted neersighted added status/duplicate Duplicate issues and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 5, 2023
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

2 participants